Fix a Dependent Drop-Down List in an Adobe Acrobat PDF Form
Question details
Update a PDF form script so the Division drop-down displays options based on the selected Department.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- A user selects a Department in an interactive PDF form and expects the Division list to update.
- Observed behavior
- The Division list does not populate because the script uses unsupported setDivision and misspelled setDivison calls.
Open the form in Adobe Acrobat and confirm that you can edit its fields. Check the exact field names and Department export values in the field properties before updating the script.
Update the Department validation script with setItems
Use Acrobat's combo box methods to replace Division options when the Department selection changes.
Acrobat uses setItems to populate a combo box and clearItems to remove its options. The example below handles one Department value; replace the sample Division names and add cases for your other departments.
In Acrobat, open the PDF and choose All tools > Prepare a form. Double-click the Department drop-down to open its Properties.
On the Validate tab, select Run custom validation script and click Edit. Replace the existing logic with a script such as: var division = this.getField("Division"); if (division) { switch (event.value) { case "Public Works": division.setItems(["Engineering", "Maintenance"]); break; default: division.clearItems(); } }
In the script editor, replace "Division" with the exact target field name if needed. Match each case to the Department option's export value, and replace the example Division options with your own. Change any remaining setDivision or setDivison calls to setItems.
Save the PDF, close Prepare a form, and select each Department in Acrobat. Confirm that Division shows the corresponding options and clears for an unmatched value. If the update occurs only after leaving the field, check Commit selected value immediately on the Department field's Options tab.

Work with PDFs and Office files in WPS Office
WPS Office is a free, lightweight alternative for everyday PDF and Office work, with a familiar interface and compatibility that makes it easy to move between common file formats. Use Adobe Acrobat to repair and test Acrobat-specific form JavaScript; WPS does not fix that script.

Frequently Asked Questions
Why does setDivision not populate the drop-down?
setDivision is not the Acrobat combo box method for assigning options. In the Department field's validation script, use the Division field's setItems method instead.
How do I clear Division when no department matches?
Add a default case to the Department script's switch statement and call division.clearItems(), where division is the field returned by this.getField("Division").
Why does the list update only after I leave the Department field?
In Prepare a form, open the Department field's Properties and check Commit selected value immediately on the Options tab. Then test the selection again.
Should I test the form in a browser?
Test it in Adobe Acrobat. Browser PDF viewers may not consistently support the Acrobat JavaScript used to update form fields.




