PDF Editing Issues

How to Populate Multiple Acrobat Form Fields from a Combo Box

Nimra MalikNimra Malik Nov 3, 2026 869 views

Question details

The user needs to automatically fill multiple target form fields (like serial number and battery type) when a specific equipment name is selected from a combo box in a PDF.

How to Populate Multiple Acrobat Form Fields from a Combo Box
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Creating an interactive PDF form for equipment tracking that auto-fills related data to save time.
Observed behavior
Requires a JavaScript implementation to map approximately 10 combo box selections to their corresponding target text fields.
Before you start

Before writing your script, decide whether the auto-populated fields (like the serial numbers) should remain editable by the user or be set to read-only.

Solution 1Recommended

Use Acrobat JavaScript in the Combo Box Properties

You can achieve this by adding a custom JavaScript to the Validate or Keystroke action of the combo box, which maps each selection to the corresponding field values.

By utilizing Acrobat JavaScript, you can listen for changes in the combo box selection. Once a user picks an equipment name, the script looks up the associated serial number and battery type, then updates the target text fields automatically.

1
Open Prepare Form Mode

Open your PDF in Adobe Acrobat, navigate to the 'Tools' menu, and select 'Prepare Form' to make your form fields editable.

2
Enable Immediate Value Commitment

Right-click the combo box, select 'Properties', and go to the 'Options' tab. Check the box for 'Commit selected value immediately' so the script triggers as soon as a selection is made.

3
Add the Custom Script

Switch to the 'Format' tab, choose 'Custom' from the Select format category drop-down, and click 'Edit' next to Custom Keystroke Script. Alternatively, use the 'Validate' tab to run a custom validation script.

4
Write the JavaScript Mapping

Enter a script using a switch statement or an object map. For example, use `if (event.value == 'Equipment A') { this.getField('SerialNumber').value = '12345'; }` to map the values. Ensure the field names in the script exactly match your PDF.

5
Configure Target Field Permissions

If the populated fields should not be manually altered, right-click the target text fields, select 'Properties', go to the 'General' tab, and check the 'Read Only' option.

Use Acrobat JavaScript in the Combo Box Properties
JavaScript vs Java: Acrobat uses JavaScript for form automation, which is entirely different from the Java programming language. Ensure you are looking up references for Acrobat JavaScript (JS) specifically.
Free Microsoft Office alternative

Manage and Fill Interactive PDF Forms with WPS Office

While advanced custom scripting requires specialized software like Adobe Acrobat, WPS Office provides a lightweight, highly compatible alternative for viewing, filling, and managing standard PDF forms and Microsoft Office documents.

  1. 1. Download and Install: Download WPS Office for free from the official website and install it on your device.
  2. 2. Open Your PDF Form: Launch WPS Office and open your interactive PDF document using the built-in WPS PDF tool.
  3. 3. Fill and Save: Click directly on the highlighted form fields to input your data, then easily save or export your filled PDF.
Fully compatible with standard Adobe PDF formats and interactive forms.Easily fill, edit, and sign PDF forms without navigating complex settings.All-in-one free suite offering seamless transitions between Word, Excel, PowerPoint, and PDF formats.
microsoft office alternative - wps office

Frequently Asked Questions

Why aren't my target fields updating when I select an item from the combo box?

This usually happens if the combo box is not set to 'Commit selected value immediately' in the Options tab of its properties. Without this checked, the script won't run until you click completely outside of the field.

Can I use Java to script my PDF form fields?

No. Despite the similar names, Java and JavaScript are different languages. PDF applications utilize a specific implementation called Acrobat JavaScript to automate form fields.

How do I make sure users cannot edit the fields that were automatically populated?

You need to change the properties of the target text fields. Right-click the field, select Properties, navigate to the General tab, and check the 'Read Only' box.

Do field names in the script need to be case-sensitive?

Yes, Acrobat JavaScript is strictly case-sensitive. The field names referenced in your `this.getField('FieldName')` method must match the exact capitalization used in the form field properties.