Export a Combo Box Value to Another Acrobat Form Field
Question details
Send the selected combo box option's eight-digit charge code to another PDF form field instead of its visible label.

- Product
- Adobe Acrobat PDF forms
- Device & OS
- not provided
- Scenario
- A PDF form uses a combo box to show a job location label while a separate field needs the associated charge code.
- Observed behavior
- The destination field should contain the selected option's export value, such as 50020000, rather than a label such as Riverside-2367.
Open the PDF in Adobe Acrobat and confirm that you can edit its form fields. Identify the combo box field name and the destination text field before adding the export values and script.
Use combo box export values in a destination field calculation
Assign a charge code to each predefined option, then use a custom calculation script to copy the selected export value.
In Acrobat, open Prepare a Form, then double-click the combo box. On the General tab, check its field name; the example below uses Job_Location_name.
In the combo box Properties dialog, open the Options tab. For each choice, enter the visible label in Item and its eight-digit charge code in Export Value, then add or update the option. For example, use Riverside-2367 as the item and 50020000 as its export value.
Double-click the destination text field, open its Calculate tab, and select Custom calculation script. Click Edit and enter: var f = this.getField("Job_Location_name"); if (f.currentValueIndices != -1) event.value = f.value; else event.value = "";. Replace Job_Location_name with your actual combo box field name if it differs.
Close the Properties dialog and use Preview in Prepare a Form. Select an option and commit the selection; if you type in an editable combo box, press Enter. Confirm that the destination field displays the assigned charge code.

Work with PDF and Office files in WPS Office
WPS Office is a free, lightweight alternative for working with PDFs and Office documents. Its familiar interface and Microsoft Office format compatibility make it easy to move existing files into your workflow. Use Adobe Acrobat for the form-specific calculation script described above.

Frequently Asked Questions
Where do I set a combo box export value in Acrobat?
Open Prepare a Form, double-click the combo box, and use the Options tab to pair each visible Item with an Export Value.
Why does the destination field show the label instead of the charge code?
Check the combo box's Options tab to make sure the selected item has the intended export value. Then check that the destination field's custom calculation script reads the combo box field's value.
Can a typed combo box entry have an export value?
Only a predefined option has the export value assigned to it in the Options tab. An arbitrary typed entry needs to be added as an option or handled with a separate mapping script.
Where should I put the JavaScript?
In Prepare a Form, open the destination text field's Properties, select the Calculate tab, and click Edit under Custom calculation script.




