Other PDF Issues

How to Populate an Acrobat Drop-Down List from Multiple Other Lists

Kushani NimanthikaKushani Nimanthika Oct 28, 2026 869 views

Question details

The user needs to create a dynamic drop-down list in a PDF form where the available options are generated from selections made in two other drop-down fields.

Populate an Acrobat Drop-Down List from Multiple Other Lists
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Creating advanced interactive PDF forms that require conditional logic and dynamic data.
Observed behavior
A third drop-down list needs to dynamically update its items using JavaScript whenever the user changes the selections in the first two source drop-down fields.
Before you start

Ensure you have Adobe Acrobat Pro installed, as standard Adobe Reader does not support creating or editing JavaScript within PDF form fields. You will also need a basic understanding of JavaScript arrays and Acrobat API methods.

Solution 1Recommended

Using a Custom Calculation Script in Adobe Acrobat

Apply a custom JavaScript calculation script to the target drop-down field to read, process, and combine values from the source fields.

To make a drop-down list dynamic, you must attach a calculation script to the target field. This script will trigger every time the source fields are updated, gathering their current values and assigning them as options to the third field.

1
Enter Form Editing Mode

Open your PDF form in Adobe Acrobat Pro and select 'Prepare Form' from the Tools menu to enter editing mode.

2
Open Target Field Properties

Right-click the third (target) drop-down field, select 'Properties', and navigate to the 'Calculate' tab.

3
Add Custom Calculation Script

Select the 'Custom calculation script' option and click the 'Edit' button to open the JavaScript editor window.

4
Write the JavaScript Logic

Enter JavaScript code to read the source fields using `this.getField("Field1").valueAsString` and `this.getField("Field2").valueAsString`. Combine these values into an array, ensuring you exclude any empty or duplicate values.

5
Assign Values to the Drop-Down

At the end of your script, use the `setItems(yourArray)` method on the target field object to populate the drop-down list with the dynamically generated array.

6
Save and Test

Click 'OK' to save the script, close the properties dialog, and exit 'Prepare Form' mode to test the drop-down fields' interaction.

Using a Custom Calculation Script in Adobe Acrobat
Browser Compatibility Warning: Always test your dynamic PDF forms in Adobe Acrobat or Adobe Reader. Many built-in browser PDF viewers lack the necessary JavaScript engine to execute methods like setItems().
Free PDF & Office Editor

View and Manage Interactive PDF Forms with WPS Office

While creating complex JavaScript-based dropdowns requires Adobe Acrobat Pro, WPS Office offers a highly efficient, free alternative for opening, filling out, and managing interactive PDF forms. It is an all-in-one suite that handles your daily document needs seamlessly without a heavy subscription.

  1. 1. Install WPS Office: Download and install the free WPS Office suite on your computer or mobile device.
  2. 2. Open Your PDF Form: Launch WPS PDF and open your interactive PDF document.
  3. 3. Fill Out the Form: Click directly on the interactive form fields, including drop-down lists, to input your data seamlessly.
  4. 4. Save and Export: Use the save icon or export options to securely save your filled-out PDF form to your local drive or cloud storage.
Easily view and fill out dynamic PDF forms containing drop-down listsFully compatible with Microsoft Office formats (Word, Excel, PowerPoint) and standard Adobe PDFsLightweight installation that opens large, interactive PDF files instantlyFree built-in tools for annotating, editing, and signing PDF documents
microsoft office alternative - wps office

Frequently Asked Questions

Why isn't my PDF JavaScript working when opened in Chrome or Edge?

Most modern web browsers use lightweight, built-in PDF viewers that do not support advanced Acrobat JavaScript features like `setItems()`. For dynamic scripts to function properly, the end-user must open the form in dedicated PDF software like Adobe Acrobat or Adobe Reader.

How do I prevent duplicate values from appearing in the third drop-down list?

Within your custom calculation script, you can use a JavaScript array filtering loop or a `Set` object to check for and remove duplicate string values before passing the final cleaned array into the `setItems()` method.

Can I populate a PDF drop-down list from an external database?

Standard PDF JavaScript cannot directly query external SQL databases due to strict security sandboxing. To achieve similar functionality, you must hardcode the data arrays within document-level JavaScript, or use external data objects (ADO) which are restricted to specific trusted enterprise environments.