Change a PDF Dropdown Based on Another Field in Adobe Acrobat
Question details
The user wants a second PDF dropdown to show different options based on the selection in the first dropdown.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- A PDF form has two dropdown fields, and the available choices in the second field should depend on the first field's value.
- Observed behavior
- Selecting Option A should populate the second dropdown with A, B, and C; selecting Option B should populate it with D, E, F, and G.
Open the PDF in a version of Adobe Acrobat that can edit forms, and make sure both dropdown fields exist. Check their exact field names and the first dropdown's option values before adding the script.
Add a validation script to the first Acrobat dropdown
Use this method to replace the second dropdown's options whenever the first dropdown's value is committed.
In Acrobat, open the PDF and select Prepare a form. Select the first dropdown field and open its Properties.
On the Options tab, confirm that the values used by the script match the dropdown's values. If available, enable Commit selected value immediately so the second field updates as soon as a selection is made.
In the first dropdown's Properties, open the Validate tab, select Run custom validation script, and click Edit. Enter: var field2 = this.getField("Dropdown2"); if (event.value == "Option A") { field2.setItems(["A", "B", "C"]); } else if (event.value == "Option B") { field2.setItems(["D", "E", "F", "G"]); }
Replace "Dropdown2" in the script with the exact name shown in the second dropdown's Properties. Match capitalization and spelling for the field name and option values.
Close Properties, preview the form, and select Option A and then Option B in the first dropdown. Check that the second dropdown displays the corresponding choices, then save the PDF.

Work with PDF and Office files in WPS Office
WPS Office is a free, lightweight alternative for everyday document work, with a familiar interface and compatibility with common Office formats for an easier move from Microsoft Office. It does not fix Acrobat's form script or guarantee support for dependent dropdown JavaScript.

Frequently Asked Questions
Why doesn't the second dropdown update immediately?
Open the first dropdown's Properties in Prepare a form and check the Options tab for Commit selected value immediately. Otherwise, the validation script may run only after the field's value is committed.
What if my dropdown has an export value?
Use the value passed to the validation script in event.value, which can be the option's export value rather than its displayed label. Check the first dropdown's Options tab and update the comparisons to match.
Why does the script fail to find the second dropdown?
In Prepare a form, open the second dropdown's Properties and check its exact field name. Replace "Dropdown2" in this.getField("Dropdown2") with that name, including matching capitalization.
Will the dependent dropdown work in every PDF viewer?
Not necessarily. The viewer must support the relevant Acrobat form JavaScript, and JavaScript may need to be enabled. Test the saved PDF in the viewers your recipients plan to use.




