Skip to main content
Participant
January 5, 2022
Question

Acrobat JavaScript help

  • January 5, 2022
  • 1 reply
  • 402 views

I'm creating a order form that has multiple variables and conditions and I can't seem to figure out the Custom Calculation Script or if it's even possible.

 

In the form I have products selling at an individual price and a price per case of the product.

  • Each product cost $2.00
  • Each Case cost $24.00,
  • Each 1/2 Pallet cost $288.00
  • Each full Pallet cost $576.00

 

Depending on how much product is purchased, the buyer will get a discount:

  • Spend less than $100 = no discount
  • $100-280 = 15% discount
  • 1/2 Pallet (12-23 Cases) = 15% discount
  • Full Pallet (24 or more Cases) = 25% discount

 

The image attached is how my form is structured. 9A & 9B will be quantities while 9C & 9D will be calculated prices based on the quantity ordered. The box on the right (9E) will be hidden and will hold the discounted price.

 

 

The discounted price will then be added with all the other line items and displayed in a TOTAL Discount field.

 

I'd appreciate any help. Thank you for your time.

 

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
January 5, 2022

So 9C is (9A * 2) and 9D is (9B * 24)?

If so, you can just enter those formulas under the Simplified Field Notation of those fields.

The discount will require a more complex, custom-made calculation script.

Participant
January 6, 2022

That's great! Thank you.

 

The JavaScript seems tricky.