How to Calculate Different Rates Using Acrobat PDF Check Boxes
Question details
The user needs to apply varying multiplication rates in a PDF calculation based on which check box is selected in the form.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Creating a dynamic PDF form that calculates a final value using different multipliers associated with specific check boxes.
- Observed behavior
- Requires a custom JavaScript solution to read the states of different check boxes and multiply other fields (such as 'PaidYouth' and 'Term') by the correct conditional rate.
Ensure you have the 'Prepare Form' tool enabled in your PDF editor and accurately note down the exact field names of your check boxes and data fields, as JavaScript is case-sensitive.
Apply Custom JavaScript for Check Box Calculations
Use a custom calculation script within the properties of your target text field to assign different multipliers based on the state of your check boxes.
PDF forms natively support basic calculations, but conditional logic based on check box states requires custom JavaScript. By checking if a box is 'Off' or not, you can dynamically assign a multiplier variable before executing the final math operation.
Right-click the text field where you want the final calculated value to appear and select 'Properties' from the context menu.
Navigate to the 'Calculate' tab within the Properties window. Select the 'Custom calculation script' option, and then click the 'Edit' button.
Enter your conditional JavaScript logic to check the boxes. For example: `var multiplier = 5.5; if (this.getField("Check Box1").valueAsString != "Off") { multiplier = 2.5; } else if (this.getField("Check Box2").valueAsString != "Off") { multiplier = 3.5; }`
Below the conditional logic, multiply your target fields by the determined multiplier: `event.value = Number(this.getField("PaidYouth").valueAsString) * Number(this.getField("Term").valueAsString) * multiplier;`
Click 'OK' to save the script, close the Properties panel, and test your form by toggling the check boxes and entering sample data.

Edit and Create Interactive PDF Forms with WPS Office
WPS Office provides comprehensive PDF editing tools, allowing you to create interactive forms, add text fields, check boxes, and manage form properties with ease.
- 1. Open your PDF document: Launch WPS Office and open your PDF document using the WPS PDF tool.
- 2. Access Form Tools: Navigate to the 'Form' tab in the top ribbon menu to reveal interactive form options.
- 3. Insert Form Controls: Use the 'Check Box' and 'Text Field' tools to design your interactive form layout.
- 4. Configure Properties: Double-click any form field to open its Properties panel, where you can adjust names, appearances, and calculation settings.

Frequently Asked Questions
What happens if a user selects both check boxes?
With an 'if/else if' JavaScript structure, the script evaluates conditions sequentially. It will apply the multiplication rate of whichever check box is evaluated first in the code and ignore the second. To prevent this ambiguity, you should use Radio Buttons instead.
Why is my calculated value returning as zero or blank?
This usually occurs if the field names in your JavaScript do not exactly match the field names in your form. Ensure there are no typos, and remember that JavaScript is strictly case-sensitive.
Can I use this script for more than two check boxes?
Yes, you can expand the script by adding additional 'else if' statements for as many check boxes as you need, assigning a specific multiplier to each newly evaluated field.
Where do I find the calculation tab in my PDF editor?
First, ensure you are in the form editing or 'Prepare Form' mode. Right-click the destination text field, select 'Properties', and look for the 'Calculate' tab located at the top of the Text Field Properties dialog box.




