Clear Specific Checkbox Groups in an Adobe Acrobat PDF Form
Question details
The user needs a PDF form button to clear only checkboxes whose field names begin with Potential.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- A form button should reset a specific set of checkboxes without changing other fields.
- Observed behavior
- The current JavaScript using getArray does not clear the intended checkboxes.
Open the PDF in Adobe Acrobat and select Prepare a form to inspect the exact checkbox field names and their default values. Make sure the form contains a button where you can add a JavaScript action.
Reset a Hierarchical Checkbox Group
Use this method when the checkboxes share a parent field name and their default values are unchecked.
In Prepare a form, inspect the checkbox names. Name the fields using a common parent, such as Potential.check1, Potential.check2, and Potential.check3, if appropriate.
Double-click the form button, open the Actions tab, choose a trigger such as Mouse Up, and select Run a JavaScript as the action.
Click Add and enter: this.resetForm(["Potential"]); Save the action and close the button properties.
Preview the form, select checkboxes in the Potential group and elsewhere, then click the button. Confirm that the Potential fields return to their default values while unrelated fields remain unchanged.

Clear Numbered Checkbox Fields with a Loop
Use this method when the fields have separate names such as Potential0 through Potential4.
Work with PDF Forms and Office Files in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for working with PDFs and Office documents. Its format compatibility helps make moving everyday documents straightforward; use Adobe Acrobat to edit and test the form's JavaScript.

Frequently Asked Questions
Why doesn't getArray find fields named Potential0 and Potential1?
getArray works with a field's hierarchical children; a shared text prefix alone does not make separately named fields a group. Use a parent name such as Potential.check1 and Potential.check2, or address the numbered fields individually.
Will resetForm always uncheck the selected boxes?
No. It restores the fields to their default values. Check the defaults in Prepare a form, or set each checkbox value to "Off" when the goal is to uncheck it explicitly.
Where do I add the button script in Acrobat?
Open Prepare a form, double-click the button, and select the Actions tab. Choose a trigger such as Mouse Up, select Run a JavaScript, and click Add.
How can I clear more than five numbered checkboxes?
In the button's JavaScript action, adjust the loop's starting and ending numbers to match the field names. For example, use i <= 9 for fields Potential0 through Potential9.




