PDF Editing Issues

How to Remove a Score Calculation When an Acrobat PDF Checkbox is Unchecked

John WilsonJohn Wilson Nov 3, 2026 868 views

Question details

The user needs to reset a dependent numeric field so that a calculated score is properly removed from the final total when a controlling checkbox is unchecked in a PDF form.

How to Reset a Score Calculation When a PDF Checkbox is Unchecked
Product
Adobe Acrobat / PDF Forms
Device & OS
not provided
Scenario
Creating or editing an interactive PDF form with custom numeric calculations tied to checkboxes.
Observed behavior
The calculated score remains in the final total even after the controlling checkbox is cleared by the user.
Before you start

Ensure you have access to the PDF form editing tools and know the exact internal field name of the dependent numeric field you want to reset.

Solution 1Recommended

Use Custom JavaScript on a Mouse Up Action

Add a custom script to the checkbox properties to clear the dependent field's value immediately when the checkbox is turned off.

By default, PDF form fields do not automatically clear their dependent values just because a controlling checkbox is toggled. You must define a specific action using JavaScript to explicitly reset the dependent field back to blank or zero.

1
Open Checkbox Properties

Open your PDF form in editing mode. Right-click the target checkbox that controls the score and select 'Properties' from the context menu.

2
Add a Mouse Up Action

Navigate to the 'Actions' tab. From the 'Select Trigger' dropdown menu, select 'Mouse Up'.

3
Insert the JavaScript Code

Choose 'Run a JavaScript' from the 'Select Action' dropdown and click 'Add'. In the script editor, enter the following code: if (event.target.value == "Off") { var f = this.getField("YourField"); if (f) f.value = ""; }

4
Customize the Field Name

Replace 'YourField' in the provided script with the exact name of your dependent numeric field. Click 'OK' to save the script, then close the properties dialog.

Use Custom JavaScript on a Mouse Up Action
Verify Total Calculation: After saving, test the checkbox in preview mode. Ensure that the final score calculation correctly processes the newly emptied dependent field without generating syntax errors.
WPS PDF Editor

Easily Manage Interactive PDF Forms with WPS Office

WPS Office provides a comprehensive PDF editor that allows you to view, fill, and manage interactive PDF forms effortlessly. Handle document formatting, fillable fields, and text edits within one lightweight application.

  1. 1. Open PDF Editor: Launch WPS Office and open your PDF document using the WPS PDF Editor tool.
  2. 2. Access Form Tools: Navigate to the 'Form' or 'Edit' tab on the top ribbon to view all interactive fields and properties.
  3. 3. Edit and Save: Make your necessary adjustments to the interactive properties, then click 'Save' to apply your new settings.
Edit PDF text, images, and form fields directly.Highly compatible with standard PDF formats and interactive elements.Lightweight software with a familiar, user-friendly interface.Seamlessly convert between PDF, Word, Excel, and other formats.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my PDF calculation not update immediately?

Calculations in PDF forms often require a specific event trigger, such as a 'Mouse Up' action or losing focus on a field. Ensuring your script is tied to the correct trigger helps the form update the total in real time.

What is the 'Off' value for a PDF checkbox?

In standard PDF forms, an unchecked checkbox typically has the export value of 'Off'. When checking states in JavaScript, comparing the event target value to 'Off' accurately detects when the box is cleared.

Can I reset multiple fields with one checkbox?

Yes. You can add multiple field assignment lines within the same JavaScript block to clear out or reset several dependent numeric fields simultaneously when the checkbox is unchecked.