How to Make Multiple Acrobat Checkbox Scripts Work Independently in PDF Forms
Question details
The user needs to make duplicated checkboxes and text fields in an Acrobat PDF form operate independently without affecting each other.

- Product
- Adobe Acrobat / PDF
- Device & OS
- not provided
- Scenario
- Creating or editing interactive PDF forms with multiple checkboxes and text fields.
- Observed behavior
- Duplicated checkboxes remain linked, causing a single checkbox to show or hide the wrong text field or multiple fields simultaneously.
Ensure you have access to a PDF editor with advanced form field properties and JavaScript capabilities before attempting to modify the document's interactive scripts.
Update Field Names, Export Values, and JavaScript for Independent Control
Assign unique names and export values to each checkbox and update their associated scripts to reference specific target fields.
When you duplicate checkboxes in a PDF form, they often retain the same field name and export value, causing them to act as a single linked group. To make them work independently, each checkbox needs a unique identifier and a specific script to control its corresponding text field.
Right-click the first checkbox in your PDF editor, select 'Properties', and type a unique identifier in the 'Name' field (e.g., Checkbox1). Repeat this process for all duplicated checkboxes.
Navigate to the 'Options' tab within the Checkbox Properties. Ensure each checkbox has a distinct 'Export Value' if they share a group name, or simply ensure the fields are completely unique.
Go to the 'Actions' tab, choose 'Run a JavaScript' from the dropdown, and add a script tailored to the specific text field it controls. For example: this.getField('Text1').display = event.target.isBoxChecked(0) ? display.visible : display.hidden;
Click 'OK' to save the script, close the properties window, and test the checkboxes in the form preview mode to verify they now operate independently.

Easily Manage Interactive PDF Forms with WPS PDF
WPS Office provides a comprehensive PDF editor that allows you to easily insert, edit, and manage interactive form fields like checkboxes and text boxes with an intuitive interface.
- 1. Open PDF in WPS: Launch WPS Office and open your PDF document containing the interactive forms.
- 2. Access Form Tools: Navigate to the 'Form' tab on the top ribbon to access the interactive field editing tools.
- 3. Edit Checkboxes: Click on the checkbox tool to add new independent checkboxes, or double-click existing ones to easily modify their unique properties.
- 4. Save the Form: Once your fields are properly configured, save the PDF to lock in the interactive form changes.

Frequently Asked Questions
Why do multiple checkboxes check at the same time in my PDF form?
This happens when duplicated checkboxes share the exact same field name. To fix this, open the properties of each checkbox and assign them unique names so the PDF reader treats them as separate entities.
What is an export value in a PDF checkbox?
The export value is the specific data sent or recorded when a checkbox is selected. If multiple checkboxes belong to the same group (sharing the same field name), they must have different export values to be distinguished by form scripts.
Can I use JavaScript to hide a text box when a checkbox is unchecked?
Yes, you can add a custom JavaScript action to the checkbox properties using the display.hidden method. The script evaluates the isBoxChecked event status and toggles the visibility of the target text box accordingly.




