PDF Editing Issues

Clear and Disable PDF Checkboxes with an Acrobat Dropdown

Phi Hung VoPhi Hung Vo Nov 24, 2026 869 views

Question details

Configure a PDF dropdown to clear and disable five checkboxes when D3 is selected, and make them available for other selections.

Clear and Disable PDF Checkboxes Based on a Dropdown in Acrobat
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.
Before you start

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.

Solution 1Recommended

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.

1
Open the dropdown properties

In Acrobat, open the PDF and select Prepare a form. Right-click the dropdown field and choose Properties.

2
Commit selections immediately

On the Options tab, enable Commit selected value immediately so the validation script runs as soon as a selection is made.

3
Add the validation script

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; } }

4
Save and test the form

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.

Use a Dropdown Validation Script to Control the Checkboxes
Adjust the field colors: The example uses light gray for disabled fields and white for enabled fields. Replace these colors in the script if the form uses different background colors. The script runs when the dropdown value is validated; it does not by itself initialize the checkbox state when an existing PDF is opened.
Free Microsoft Office alternative

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.

Open PDF forms alongside documents in one office suiteCompatible with Microsoft Word, Excel, and PowerPoint formatsFamiliar interface for a smoother transition from Microsoft OfficeFree, lightweight option for everyday document work
microsoft office alternative - wps office

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.