Other PDF Issues

How to Create Tiered Discount and Shipping Calculations in Acrobat PDF Forms

Khadija KhanKhadija Khan Nov 10, 2026 868 views

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.

How to Create Tiered Discount and Shipping Calculations in Acrobat Forms
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.
Before you start

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.

Solution 1Recommended

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.

1
Enter Prepare Form Mode

Open your document in Adobe Acrobat Pro DC, navigate to the 'Tools' menu, and select 'Prepare Form' to enable field editing.

2
Access Field Properties

Right-click the specific text field where the discount or shipping amount should appear and select 'Properties'.

3
Edit Custom Calculation Script

Navigate to the 'Calculate' tab, select 'Custom calculation script', and click the 'Edit' button.

4
Input the JavaScript Logic

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="";

5
Set the Field Calculation Order

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.

Use Custom Calculation Scripts with Conditional JavaScript
Case Sensitivity: JavaScript is case-sensitive. Make sure the field names in your script (like "SUBTOTAL") perfectly match the actual names of the fields in your PDF form.
Powerful Document Management

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. 1. Open Your Document: Launch WPS Office and open your existing PDF file or create a blank one.
  2. 2. Navigate to the Form Tab: Click on the 'Form' tab on the top ribbon to access the interactive field tools.
  3. 3. Insert Form Controls: Select and place text fields, drop-down menus, and checkboxes onto your document to build your form structure.
  4. 4. Save and Distribute: Export the document as a fillable PDF to share with clients for easy digital data entry.
Fully compatible with standard Adobe PDF document formatting.Intuitive drag-and-drop form creation tools for text fields and checkboxes.Cost-effective alternative for businesses managing daily document workflows.Lightweight software that ensures fast loading and smooth performance.
microsoft office alternative - wps office

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.