How to Calculate a PDF Form Total from Selected Checkboxes
Question details
The user wants to create an interactive PDF registration form that adds up the total cost based on the checkboxes selected, without relying on hidden amount fields.

- Product
- Device & OS
- not provided
- Scenario
- Creating a PDF order or registration form requiring automatic price calculations based on user-selected sessions or items.
- Observed behavior
- The goal is to configure checkbox fields so that their designated numerical values are dynamically summed up and displayed in a total text field when checked.
Ensure you are using a PDF editor that supports advanced interactive form creation and field calculation properties, and verify that your document already contains the necessary checkboxes and a dedicated text field for the total sum.
Configure Checkbox Export Values and Use Built-in Sum Calculation
Assign specific price values directly to each checkbox and use the built-in sum function in the total text field to automatically calculate the final cost.
This method eliminates the need to create complex custom scripts or hidden text fields. By storing the price of each session directly within the checkbox's export value, the form knows exactly what numerical value to include in the calculation when the box is ticked.
Open your PDF in edit mode. Right-click the first checkbox field and select 'Properties' from the context menu.
Navigate to the 'Options' tab within the Properties window. Change the 'Export Value' to the exact price or numerical amount for that specific session (e.g., 50). Repeat this step for all relevant checkboxes.
Locate the text field you intend to use for the total cost. Right-click it, select 'Properties', and navigate to the 'Calculate' tab.
Select the option 'Value is the sum (+) of the following fields'. Click the 'Pick' button to open a list of form fields, check the boxes next to all the session checkboxes you just configured, and click 'OK'.

Easily Build and Calculate PDF Forms in WPS PDF
WPS Office offers comprehensive PDF form editing tools, empowering you to create interactive registration forms, configure checkboxes with export values, and set up automatic price calculations in just a few clicks.
- 1. Open PDF and Access Form Tools: Launch WPS Office, open your PDF document, and navigate to the 'Form' tab on the top ribbon.
- 2. Add and Configure Checkboxes: Use the 'Checkbox' tool to insert boxes. Double-click each one to open its properties and assign the specific session price in the 'Export Value' field under Options.
- 3. Insert Total Field and Calculate: Add a 'Text Field' for your total. Double-click it, go to the Calculate tab, select the sum function, and pick your configured checkboxes.
- 4. Save and Test Form: Save your PDF document and exit editing mode to test clicking the checkboxes, ensuring the total field updates correctly.

Frequently Asked Questions
Why is my PDF total field not updating when I click a checkbox?
This can happen if the calculation order is incorrect, if the export values were not set as proper numbers, or if you are previewing the PDF in a basic browser viewer that does not support interactive form calculations. Ensure you test the form in a fully-featured PDF reader like WPS PDF or Adobe Acrobat.
What happens if two checkboxes share the exact same field name?
If multiple checkboxes share the identical field name, they behave like radio buttons, meaning the user will only be able to select one of them at a time. To allow users to select multiple sessions, ensure every checkbox has a unique name in its properties.
Can I use custom formulas instead of just a simple sum for my checkboxes?
Yes. While the built-in sum function is the easiest way to total prices, you can select 'Custom calculation script' in the Calculate tab of your total field. This allows you to use JavaScript to perform complex operations like multiplication, subtraction, or conditional logic based on which checkboxes are selected.




