How to Create Tiered Discount and Shipping Calculations in Acrobat PDF Forms
Question details
The user needs to set up a fillable PDF form that automatically calculates tiered discounts and shipping rates based on different subtotal ranges.

- Product
- Adobe Acrobat Pro DC
- Device & OS
- not provided
- Scenario
- Creating an invoice, order form, or quote document where pricing rules change dynamically depending on the total order value.
- Observed behavior
- The user wants to input a subtotal and have the form accurately output a discount or shipping fee utilizing JavaScript logic for the defined tiers.
Ensure your document is open in Acrobat's 'Prepare Form' mode and note the exact names of your fields (e.g., 'SUBTOTAL') so your custom scripts reference them correctly.
Use Custom Calculation Scripts with Conditional JavaScript
You can add conditional statements into the Custom Calculation Script of your discount or shipping fields to apply specific rates based on subtotal thresholds.
Adobe Acrobat allows for advanced logic using JavaScript. By evaluating the subtotal field, you can determine exactly which multiplier to apply for a discount or shipping charge.
Open your document in Adobe Acrobat Pro DC, navigate to the 'Tools' menu, and select 'Prepare Form' to enable field editing.
Right-click the specific text field where the discount or shipping amount should appear and select 'Properties'.
Navigate to the 'Calculate' tab, select 'Custom calculation script', and click the 'Edit' button.
Enter your conditional code. For example: var sub=this.getField("SUBTOTAL").value; if(sub>=3500 && sub<=6999) event.value=sub*0.05; else if(sub>7000) event.value=sub*0.10; else event.value="";
Close the properties window. In the right-hand pane under 'More', select 'Set Field Calculation Order'. Ensure the 'SUBTOTAL' field is positioned above your discount/shipping fields so it computes first.

Design and Manage Interactive PDF Forms with WPS Office
While Acrobat Pro DC is highly specialized for complex JavaScript, WPS Office provides a robust, lightweight, and user-friendly PDF editor to create interactive fillable forms, edit text, and manage standard document workflows with ease.
- 1. Open Your Document: Launch WPS Office and open your existing PDF file or create a blank one.
- 2. Navigate to the Form Tab: Click on the 'Form' tab on the top ribbon to access the interactive field tools.
- 3. Insert Form Controls: Select and place text fields, drop-down menus, and checkboxes onto your document to build your form structure.
- 4. Save and Distribute: Export the document as a fillable PDF to share with clients for easy digital data entry.

Frequently Asked Questions
Why is my PDF form calculation returning a zero or remaining blank?
This is typically caused by an incorrect calculation order. Acrobat computes fields in a specific sequence. If the discount field calculates before the subtotal field is generated, it reads the subtotal as zero. Use the 'Set Field Calculation Order' menu to correct this.
Can I add more than two pricing tiers in my custom script?
Yes. You can chain multiple 'else if' statements together in the JavaScript snippet to accommodate as many shipping zones, weight classes, or discount tiers as your business requires.
Will these calculation scripts work if the PDF is opened in a web browser?
Calculations rely on the PDF viewer's ability to execute JavaScript. While standard desktop PDF readers (like Adobe Reader or WPS PDF) support it, some default web browser PDF viewers might disable JavaScript, preventing the automatic calculation.
How do I format the calculated discount field as a currency?
In the field's 'Properties' window, go to the 'Format' tab. Change the 'Select format category' to 'Number' or 'Special', specify your preferred decimal places, and add your desired currency symbol.




