Create Linked Country and State Drop-Down Lists in Adobe Acrobat
Question details
Create a PDF form in which the state or province options depend on the selected country.

- Product
- Adobe Acrobat Pro
- Device & OS
- not provided
- Scenario
- A form needs a country drop-down and a second drop-down that displays matching states or provinces.
- Observed behavior
- Selecting a country should update the available options in the state or province field.
Open the PDF in Adobe Acrobat Pro and decide which countries, states, provinces, and export values the form will use. Make sure Acrobat JavaScript is enabled under Preferences > JavaScript.
Link the drop-down lists with an Acrobat validation script
Use a script on the country field to replace the state or province options whenever the country selection changes.
The example uses the field names Country and StateProvince. Its country export values are US and CA; the script compares those values rather than the displayed country labels.
The state and province lists below are examples, not complete lists. Add every option your form needs.
Open the PDF in Acrobat Pro and select All tools > Prepare a form. Add two drop-down fields named Country and StateProvince.
Open Country Properties and select the Options tab. Add a prompt such as Select a country, then add United States with export value US and Canada with export value CA. Select Commit selected value immediately.
In Country Properties, open the Validate tab, choose Run custom validation script, and select Edit. Paste this script: var child = this.getField("StateProvince"); if (child) { if (event.value === "US") { child.setItems([["Select a state", ""], ["California", "CA"], ["New York", "NY"]]); } else if (event.value === "CA") { child.setItems([["Select a province", ""], ["Ontario", "ON"], ["Quebec", "QC"]]); } else { child.setItems([["Select a country first", ""]]); } }
Close the field properties, select Preview in Prepare a form, and choose each country. Confirm that StateProvince displays the matching options and replaces the previous list when the country changes.

Work with PDF and Office files in WPS Office
WPS Office is a free, lightweight alternative for everyday document and PDF work, with a familiar interface and support for common Office formats to ease migration. Use Adobe Acrobat Pro for the JavaScript-dependent drop-down setup described above.

Frequently Asked Questions
Why does the script use US and CA instead of the country names?
Those are the example country export values. Set them in Country Properties > Options, and make sure each value matches the corresponding comparison in the validation script.
How do I add more states or provinces?
Open Country Properties > Validate and edit the custom script. Add each option as a label and export-value pair inside the appropriate setItems array.
Why does the state list not update when I select a country?
Check that the child field is named StateProvince, the country export values match the script, and Commit selected value immediately is selected under Country Properties > Options. Also check that Acrobat JavaScript is enabled in Preferences > JavaScript.
Will the linked lists work in every PDF viewer?
Not necessarily. The lists depend on Acrobat JavaScript, which some browser and third-party PDF viewers do not support. Test the saved form in the intended viewer.




