PDF Editing Issues

How to Display Dropdown Export Value Instead of Item Text in PDF

Adam DavisAdam Davis Nov 3, 2026 869 views

Question details

The user needs a PDF dropdown menu to display the underlying export value (such as an abbreviation) instead of the full item label after a selection is made.

How to Display Dropdown Export Value Instead of Item Text in PDF
Product
PDF
Device & OS
not provided
Scenario
Creating or editing interactive PDF forms where dropdown lists contain long descriptions but need to display short codes or abbreviations once selected.
Observed behavior
By default, the PDF form dropdown displays the user-facing item label upon selection, rather than the separate export value assigned to that item.
Before you start

Ensure you have a PDF editor with advanced form creation capabilities that supports custom JavaScript formatting, such as Adobe Acrobat Pro or WPS Office.

Solution 1Recommended

Use a Custom Format Script in the Dropdown Properties

Apply a JavaScript snippet within the dropdown's Format tab to override the default displayed text with your specified export value.

When setting up dropdowns, the item name is what the user sees in the list, and the export value is the underlying data. To force the field to show the export value (e.g., 'TX') instead of the label (e.g., 'Texas') after clicking, you must use a custom formatting script.

1
Open Dropdown Properties

Open your PDF document in form editing mode. Right-click the target dropdown field and select 'Properties' from the context menu.

2
Navigate to the Format Tab

In the Dropdown Properties dialog box, click on the 'Format' tab at the top. Do not use the Actions or Calculate tabs for this process.

3
Select Custom Formatting

Click the 'Select format category' dropdown menu and choose 'Custom' from the list of options.

4
Enter the JavaScript Code

In the 'Custom Format Script' text box, enter the following code exactly: event.value = event.target.getItemAt(event.target.currentValueIndices, true);

5
Save and Test

Click 'Close' to save the properties. Exit form editing mode and test the dropdown by selecting an item to ensure the export value is successfully displayed.

Use a Custom Format Script in the Dropdown Properties
Formatting Warning: Keep in mind that changing the displayed value via a format script modifies how the field visually behaves on the screen, but it does not alter how the underlying data selection is stored or exported.
Powerful PDF Form Editor

Create and Manage Interactive PDF Forms with WPS Office

WPS Office offers a comprehensive built-in PDF editor that allows you to seamlessly create, edit, and fill interactive PDF forms, including custom dropdowns and text fields.

  1. 1. Open your PDF: Launch WPS Office and open the PDF document where you want to add or modify form fields.
  2. 2. Access Form Tools: Navigate to the 'Form' tab on the top ribbon to access the interactive form creation tools.
  3. 3. Add a Dropdown Field: Click on the 'Combo Box' (Dropdown) icon and draw the field onto your PDF page.
  4. 4. Configure Properties: Double-click the new dropdown field to open its properties, where you can define item labels and their corresponding export values.
  5. 5. Save the Document: Save your PDF to lock in the interactive form fields for users to fill out.
Easily insert and customize dropdown lists in PDF formsHighly compatible with Adobe Acrobat PDF form standardsLightweight, fast, and features a user-friendly interfaceFree basic PDF viewing and form-filling capabilities
QA img-9

Frequently Asked Questions

Why isn't my custom format script working when placed in the Actions tab?

The provided script specifically modifies the display formatting of the field. If placed in the Actions or Calculate tabs, the script will not trigger correctly upon a user's selection. You must always place it in the Custom Format Script section under the Format tab.

Can I use this method to display state abbreviations automatically?

Yes. Set up your dropdown items with the full state name as the 'Item' (e.g., 'Texas') and the abbreviation as the 'Export Value' (e.g., 'TX'). Adding the provided JavaScript to the Format tab will ensure 'TX' is displayed when 'Texas' is selected.

Will displaying the export value affect how the form data is submitted?

No. Modifying the displayed value via a format script only changes what the user visually sees on the document screen. The actual underlying export value remains intact and will be submitted correctly when the form data is extracted.