Other PDF Issues

Autofill an Adobe Acrobat Text Field from Three Dropdown Lists

Natalie TaylorNatalie Taylor Nov 19, 2026 868 views

Question details

Combine the selections from three PDF dropdown lists automatically in one text field.

Autofill an Adobe Acrobat Text Field from Three Dropdown Lists
Product
Adobe Acrobat
Device & OS
not provided
Scenario
A PDF form has BuildingStyle, Width, and Length dropdowns and needs a single description based on their selections.
Observed behavior
The destination text field should display the selected values together and update when the selections change.
Before you start

Open the PDF in Adobe Acrobat with access to Prepare a Form. Confirm that the three dropdown field names match BuildingStyle, Width, and Length exactly, and identify the destination text field.

Solution 1Recommended

Add a Custom Calculation Script to the Destination Text Field

Use this method to join nonempty dropdown values with spaces and display them in one calculated text field.

1
Open the form editor

Open the PDF in Acrobat and select Prepare a Form from the tools menu.

2
Open field properties

Right-click the destination text field, choose Properties, and open the Calculate tab.

3
Enter the calculation script

Select Custom calculation script, click Edit, and enter: var combinedValue = ""; if (this.getField("BuildingStyle").valueAsString != "") combinedValue += this.getField("BuildingStyle").valueAsString + " "; if (this.getField("Width").valueAsString != "") combinedValue += this.getField("Width").valueAsString + " "; if (this.getField("Length").valueAsString != "") combinedValue += this.getField("Length").valueAsString; event.value = combinedValue;

4
Save and test the form

Confirm the script, close Properties, and save the PDF. Exit form editing, then change each dropdown selection and check the destination field.

Add a Custom Calculation Script to the Destination Text Field
Check field names and viewer support: The names in getField must exactly match the form field names. The script can leave a trailing space when Length is empty, and PDF viewers that do not support Acrobat JavaScript may not calculate the field.
Free Microsoft Office alternative

Work with PDFs and Office Files in WPS Office

WPS Office is a free, lightweight alternative for viewing PDFs and working with Office documents in a familiar interface. It supports common Microsoft Office formats for easier migration, but use Acrobat to create and test this custom PDF calculation script.

Open and view PDF forms alongside other documentsCompatible with Microsoft Word, Excel, and PowerPoint formatsFamiliar interface for working across document typesFree, lightweight Office alternative
microsoft office alternative - wps office

Frequently Asked Questions

Where do I put the calculation script in Acrobat?

In Prepare a Form, open the destination text field's Properties, select the Calculate tab, and click Edit under Custom calculation script.

Why is the combined field blank or showing an error?

Check that BuildingStyle, Width, and Length exactly match the dropdown field names in Prepare a Form. Also test the PDF in Acrobat with JavaScript enabled.

Will the field update as soon as I select a dropdown option?

It updates when Acrobat commits the dropdown value and recalculates the form. To commit a choice immediately, check the dropdown field's Options tab for Commit selected value immediately.

What happens if a dropdown uses an export value?

The script reads each field's valueAsString, which may be the dropdown item's export value rather than its displayed label. Check the item settings in the dropdown field's Options tab if the result is unexpected.