Need Help in Creating a Custom Calculation Script [no JavaScript experience]
I need help in creating a custom calculation script using JavaScript. I have zero experience with JavaScript so this is all very brand new to me.
I converted an Excel form to a fillable PDF.
I have a PRICE field, TOTAL DISTRIBUTED BLUE T-SHIRTS field, TOTAL DISTRIBUTED GREY T-SHIRTS field and a TOTAL VALUE OF DISTRIBUTED T-SHIRTS field.
The PRICE field is fixed as $8.50 [this field is read only].
The TOTAL DISTRIBUTED BLUE T-SHIRTS field is calculated based off of the total combined quantities entered for sizes S, M, L, XL, 2XL and 3XL.
The TOTAL DISTRIBUTED GREY T-SHIRTS field is calculated based off of the total combined quantities entered for sizes M, L, XL, 2XL and 3XL [no S offered in grey].
The TOTAL VALUE OF DISTRIBUTED T-SHIRTS field should be the sum of the TOTAL DIST'B BLUE + TOTAL DIST'B GREY x $8.50.
Adobe offers a Sum
, Product
, Average, Minimum & Maximum only or entering a calculation written in JavaScript.
Shown below, the $900.00 is a simple calculation of 20 x 45. However, I need the end result to show a total of 65 [20+45] t-shirts times $8.50 each for a total value of $552.50.

