Use Display and Export Values in Acrobat Dropdown Forms
Question details
Configure a PDF form dropdown to display width descriptions while using numeric amounts for calculations and the selected width in a naming field.

- Product
- Adobe Acrobat PDF forms
- Device & OS
- not provided
- Scenario
- A form needs dropdown options such as 8', 10', and 12' to correspond to purchase amounts used in calculations.
- Observed behavior
- The naming field needs the selected width label rather than the dropdown's numeric export value.
Open the PDF in Acrobat and select Prepare a form to check the dropdown and naming field names. You need a version of Acrobat that can edit form fields and add custom calculation scripts.
Set Dropdown Export Values and Copy the Selected Width
Use separate labels and numeric export values, then retrieve the selected label for the naming field.
A dropdown's value and valueAsString generally return its export value, not its displayed label. Use the selected item index with getItemAt to retrieve the label.
In Prepare a form, open the dropdown's Properties and select Options. Add each width as an Item, such as 8', and enter its matching numeric Export Value, such as 100.00. Repeat for the other widths and amounts.
On the General tab of each field's Properties, note the dropdown name and the text field that should contain the width. For the script below, the dropdown is named PurchaseAmount; replace that name if yours differs.
Open the naming text field's Properties, select Calculate, choose Custom calculation script, and click Edit. Enter: var d = this.getField("PurchaseAmount"); var i = d.currentValueIndices; event.value = (typeof i === "number" && i >= 0) ? d.getItemAt(i, false) : "";
Close the field properties and exit form editing. Select each dropdown option and confirm that the naming field shows its width while calculations use the corresponding numeric export value.

Review PDFs and Work with Office Files in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for working with PDFs and Office documents. Its format compatibility makes it easy to move between common document workflows. Use Acrobat for the dropdown configuration and custom form script described above.

Frequently Asked Questions
Does valueAsString return the displayed dropdown text?
When an option has a separate export value, valueAsString generally returns that export value. To get the displayed label, use the dropdown's currentValueIndices with getItemAt(index, false).
Where do I enter a dropdown's export value?
In Acrobat, select Prepare a form, open the dropdown's Properties, and select Options. Enter the visible label in Item and its associated value in Export Value, then add the option.
Can two widths use the same purchase amount?
Yes, but identical export values can make options ambiguous when a selection is set by value. If each width must be distinguishable, use unique export identifiers and map those identifiers to purchase amounts in your calculation script.
Why isn't the naming field updating?
Check that the script is in the naming field's Properties under Calculate and that the dropdown name in getField matches its actual field name. Then exit Prepare a form and test the selection in Acrobat with JavaScript enabled.




