How to Set a PDF Form Total to Zero with a Checkbox
Question details
The user needs a way to make a calculated PDF form total zero or clear multiple input fields by selecting a single checkbox.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Setting up dynamic calculations and interactive fields in a PDF form.
- Observed behavior
- A total field currently sums eleven fields and a fixed amount, but a mechanism is needed to reset or zero out this total when a specific checkbox is checked.
Ensure you have access to a PDF editor that supports interactive form fields and JavaScript calculations, such as Adobe Acrobat Pro or WPS Office.
Multiply the Total by the Checkbox Export Value
Configure the checkbox to act as a mathematical multiplier in your form's custom calculation script.
By setting the checkbox's export value to a numeric digit, you can integrate it directly into the total field's calculation formula. When the box is checked, it multiplies the sum by the designated value to achieve the desired result.
Right-click the checkbox in form editing mode, select 'Properties', and navigate to the 'Options' tab. Set the 'Export Value' to 1 (or 0, depending on your mathematical logic).
Right-click the Total field where your sum is displayed, select 'Properties', and go to the 'Calculate' tab.
Select 'Custom calculation script' and enter the formula that multiplies your field sum by the checkbox value. For example: `event.value = (Field1 + Field2 + 5000) * this.getField('CheckBox1').value;`

Use a Mouse Up Action to Clear Fields
Trigger a form reset action to clear the related input fields when the user clicks the checkbox.
Create and Manage Interactive PDF Forms with WPS Office
WPS Office provides a comprehensive PDF editor that allows you to easily insert checkboxes, manage text fields, and handle complex form properties without hassle.
- 1. Open Your PDF in WPS Office: Launch WPS Office and open the PDF document you want to edit.
- 2. Access the Form Tools: Navigate to the 'Form' tab located in the top ribbon menu to view all interactive elements.
- 3. Insert a Checkbox: Click the 'Check Box' icon and click anywhere on your document to place the field.
- 4. Edit Field Properties: Double-click the newly inserted checkbox to open its properties, where you can define its appearance, actions, and export values.

Frequently Asked Questions
What is the export value of a PDF checkbox?
The export value is the specific data sent or used in mathematical calculations when the checkbox is ticked. While the default is often 'Yes', changing it to a number like '1' allows it to be used in calculation scripts.
Can I reset only specific fields instead of the entire form?
Yes. When setting up a 'Reset a form' action in the properties dialog, you will be prompted to select exactly which fields you want to clear, leaving all other fields intact.
Why is my PDF form calculation not updating immediately?
This usually happens due to calculation order issues. In your PDF editor, check the field calculation order to ensure that the total field calculates only after the dependent input fields have been processed.




