Clear and Disable PDF Checkboxes with an Acrobat Dropdown
Question details
Configure a PDF dropdown to clear and disable five checkboxes when D3 is selected, and make them available for other selections.

- Product
- Adobe Acrobat PDF forms
- Device & OS
- not provided
- Scenario
- A PDF form contains a dropdown and five checkboxes whose availability depends on the selected dropdown value.
- Observed behavior
- When the dropdown value is D3, the checkboxes should be cleared, read-only, and visually distinct. Other selections should make them editable again.
In Acrobat's Prepare a form tool, check the dropdown's export value for D3 and the exact field names of the five checkboxes. Confirm that Acrobat JavaScript is enabled in Preferences and that the intended PDF viewer supports form JavaScript.
Use a Dropdown Validation Script to Control the Checkboxes
Use this method when the checkboxes should update whenever the dropdown selection is committed.
The script compares the dropdown's committed value with D3. It clears the checkboxes only for D3; switching to another value makes them editable again but does not restore previous checkmarks.
In Acrobat, open the PDF and select Prepare a form. Right-click the dropdown field and choose Properties.
On the Options tab, enable Commit selected value immediately so the validation script runs as soon as a selection is made.
Open the Validate tab, select Run custom validation script, and click Edit. Enter the following code, replacing Check1 through Check5 with the actual checkbox field names: var names = ["Check1", "Check2", "Check3", "Check4", "Check5"]; var disable = (event.value === "D3"); for (var i = 0; i < names.length; i++) { var field = this.getField(names[i]); if (field) { if (disable) field.value = "Off"; field.readonly = disable; field.fillColor = disable ? color.ltGray : color.white; } }
Close the properties dialog, save the PDF, and test the dropdown in Acrobat or Acrobat Reader. Select D3 to verify that all five boxes clear and turn gray, then select another value to verify that they can be checked again.

Work with PDF Forms and Office Files in WPS Office
WPS Office is a free, lightweight alternative for everyday document work, with a familiar interface and support for common Microsoft Office formats. Open PDFs alongside your Office files as you move between tools; Acrobat JavaScript behavior depends on the PDF viewer and is not guaranteed in WPS.

Frequently Asked Questions
Why do the checkboxes update only after I leave the dropdown?
The dropdown value may not be committed until the field loses focus. In Prepare a form, open the dropdown's Properties, go to Options, and enable Commit selected value immediately.
Should the script compare the dropdown label or its export value?
Compare the value passed to the validation event, which may be the option's export value rather than its visible label. Check the dropdown's Options tab and replace D3 in the script if the export value differs.
Will a message appear if someone clicks a disabled checkbox?
A read-only checkbox may not receive the mouse events needed to display a message. Instead, add visible form instructions or display a message when the dropdown is changed to D3.
Why does the script work in Acrobat but not in a browser PDF viewer?
PDF viewers vary in their support for Acrobat form JavaScript. Test the saved form in Acrobat or Acrobat Reader and confirm that JavaScript is enabled in Preferences.




