How to Add Multiple Items and Export Values to an Acrobat Dropdown List
Question details
The user needs to populate a dropdown list in a PDF form with multiple items at once and assign specific export values to each option.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Creating or editing an interactive PDF form that requires bulk entry of dropdown menu options along with background export values.
- Observed behavior
- Looking for the correct JavaScript method to efficiently add multiple options and their corresponding export values to a dropdown field.
Ensure you have Adobe Acrobat Pro or a similar advanced PDF editor that supports form field editing and document-level JavaScript execution.
Use the JavaScript setItems Method
You can use a document-level or console JavaScript action with the setItems method to instantly populate your dropdown list with item names and export values.
Instead of manually typing each item into the dropdown field properties, Acrobat allows you to use JavaScript to pass an array of items.
By structuring the array as pairs of strings, you can define both the display name (what the user sees) and the export value (the data submitted or used in calculations).
Open your PDF document in Form Editing mode. Locate your target dropdown list and note its exact field name (e.g., 'Dropdown1'). Note that field names are case-sensitive.
Press Ctrl+J on Windows or Cmd+J on Mac to open the Acrobat JavaScript Debugger console, or navigate to your document-level scripts menu.
In the console, enter the following code to assign items and export values: `this.getField("Dropdown1").setItems([["Item 1", "1"], ["Item 2", "2"], ["Item 3", "3"]]);`. Highlight the code and press Enter (on the numeric keypad) or Ctrl+Enter to execute it.
Exit Form Editing mode and click on your dropdown list to confirm that the new items are correctly displayed and the respective export values are applied in the background.

Create and Edit Interactive PDF Forms Easily with WPS Office
While Acrobat requires JavaScript to bulk add export values, WPS PDF provides a user-friendly, code-free interface for creating interactive PDF forms. You can quickly add dropdown lists, text fields, and define export values directly through intuitive dialog boxes.
- 1. Open your Document in WPS PDF: Launch WPS Office and open the PDF file you wish to make interactive.
- 2. Insert a Dropdown Field: Navigate to the 'Form' tab on the top ribbon and select the 'Combo Box' or 'Drop-Down' tool, then click and drag on the page to place it.
- 3. Add Items and Export Values: Double-click the new field to open its Properties. Go to the 'Options' tab to manually add your item names and define their corresponding export values in the provided text boxes.
- 4. Save the Form: Once all items are added, close the properties window and save your PDF document to finalize the interactive dropdown menu.

Frequently Asked Questions
What is an export value in a PDF dropdown list?
An export value is the background data that is submitted, exported, or used in PDF script calculations when a user selects a specific item in the dropdown list. It can be different from the display text the user actually sees.
Can I import a long list of dropdown items from a text file into Acrobat?
Acrobat does not have a built-in button to import items directly from a text file. You will either need to write a custom JavaScript function to parse the text file and apply it using the setItems method, or use a third-party paid tool to handle the import.
Why is my JavaScript setItems code not updating the dropdown?
Ensure that the field name in your script exactly matches the field name in your PDF form, including exact case sensitivity. Additionally, verify that your PDF viewer's preferences allow JavaScript execution and that you selected/highlighted the text before executing it in the console.




