Fix Acrobat Dropdown Fields Populating Wrong PDF Fields
Question details
The user needs to fix an issue where selecting an option from one dropdown in a PDF form overwrites the fields associated with a different row or product.
- Product
- Adobe Acrobat Pro DC
- Device & OS
- not provided
- Scenario
- Creating or troubleshooting interactive PDF forms with automated dropdown fields using JavaScript.
- Observed behavior
- Two separate dropdown fields use the same JavaScript function name, causing the selection in one dropdown to incorrectly overwrite the description and cost fields associated with another product's row.
Open your interactive PDF form in Adobe Acrobat Pro DC's Prepare Form mode. Ensure you have access to the JavaScript editor to modify each dropdown field's custom keystroke script.
Assign Unique Function Names for Each Dropdown
Resolves conflicts by ensuring each dropdown calls a distinct JavaScript function tied specifically to its corresponding row.
When multiple form fields trigger a JavaScript function with the exact same name, the application may execute the most recently parsed version of the function for all fields. Creating separate functions ensures the correct target fields are updated.
Open the PDF in Acrobat Pro DC and select 'Prepare Form' from the right-hand tools pane.
Right-click the first dropdown field, select 'Properties', and navigate to the 'Format' tab.
Click 'Edit' under the Custom Keystroke Script section. Rename the function to something unique, like SetFieldValuesRow1.
Open the second dropdown's properties, edit its script in the Format tab, and assign a different unique name, such as SetFieldValuesRow2.
Inside each function's code, carefully check that the script references the correct, unique description and cost field names for that specific row.
Create a Single Dynamic Function with Row Parameters
Simplifies maintenance by using one Document-Level JavaScript function that accepts the row number as a variable to update the correct fields dynamically.
Looking for a Reliable All-in-One Office and PDF Suite?
While advanced JavaScript debugging in Acrobat can be complex, WPS Office offers a lightweight, easy-to-use alternative for handling your everyday PDF, Word, Excel, and PowerPoint files in a single intuitive application.

Frequently Asked Questions
Why are my PDF form fields duplicating data automatically?
This happens if multiple form fields share the exact same name. Acrobat treats fields with identical names as linked, so typing or selecting data in one automatically populates the others. You must give each field a unique name (e.g., Description1, Description2) to fix this.
How do I access the Custom Keystroke Script in Acrobat?
In Prepare Form mode, right-click the dropdown field and select Properties. Go to the Format tab, select 'Custom' from the Select Format Category dropdown, and click the 'Edit' button next to Custom Keystroke Script.
Can I test my JavaScript without closing the Prepare Form mode?
Yes, you can click the 'Preview' button at the top right of the Prepare Form toolbar to temporarily exit editing mode. This allows you to test your dropdowns and verify if the correct fields are populating.
Does WPS Office support filling out interactive PDF forms?
Yes, WPS Office includes a built-in PDF reader and editor that supports filling out standard interactive PDF forms, making it a great free alternative for everyday document management.




