How to Extract Checkbox Export Values from an Acrobat PDF Form
Question details
The user needs to programmatically list the field names and their corresponding export values for checkboxes and radio buttons within an Adobe Acrobat PDF form.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Extracting form field data and verifying the underlying export values assigned to specific interactive form controls.
- Observed behavior
- Requires a scripted method to loop through all document fields and print the names and export values exclusively for checkbox and radio button types.
Ensure your PDF form contains the checkboxes or radio buttons you want to query, and that you have permission to access the JavaScript Debugger console in your PDF application.
Use Acrobat JavaScript to Extract Export Values
Run a short JavaScript snippet in the Acrobat console to loop through all document fields and print the export values of checkboxes and radio buttons.
Adobe Acrobat includes a built-in JavaScript engine that allows you to interact with PDF elements programmatically. By using a simple loop, you can extract the exact export values assigned to interactive fields without checking them manually one by one.
Launch Adobe Acrobat and open the PDF document containing the interactive form fields.
Open the JavaScript Debugger by pressing Ctrl + J (on Windows) or Cmd + J (on Mac).
Copy and paste the following code into the console window: `for (var i = 0; i < this.numFields; i++) { var f = this.getField(this.getNthFieldName(i)); if (f == null) continue; if (f.type == "checkbox" || f.type == "radiobutton") console.println(f.name + ": " + f.exportValues); }`
Highlight the code and press Ctrl + Enter (or Enter on the numeric keypad) to run it. The console will print out the field names and their respective export values.

Create and Manage PDF Forms with WPS Office
If you need an easier way to build, edit, and extract data from interactive PDF forms without writing complex JavaScript code, WPS Office offers a comprehensive and user-friendly PDF editor.
- 1. Open your PDF in WPS Office: Launch WPS Office and open your interactive PDF form.
- 2. Navigate to Form Tools: Click on the 'Form' tab located on the top navigation ribbon to reveal all interactive control options.
- 3. Edit Checkboxes and Values: Double-click any checkbox or radio button to instantly view or change its underlying export value in the properties menu.
- 4. Export Form Data: Use the built-in form data extraction tools to compile and export user responses directly into a spreadsheet.

Frequently Asked Questions
What is an export value in a PDF checkbox?
An export value is the specific data string or text that is transmitted, saved, or calculated when a user selects that particular checkbox or radio button in a PDF form. For example, a 'Yes' checkbox might have an export value of '1' or 'True'.
Can I extract PDF form data without using JavaScript?
Yes. Most professional PDF editors, including WPS Office and Adobe Acrobat, feature built-in 'Export Form Data' functionalities that allow you to save the contents of filled forms directly to formats like FDF, CSV, or XML without needing to write code.
How do I change the export value of a radio button?
To change the export value, enter 'Prepare Form' or 'Form Editing' mode in your PDF software. Right-click the radio button, select 'Properties', navigate to the 'Options' tab, and update the text in the 'Export Value' or 'Radio Button Choice' field.




