How to Automatically Add Selected Checkbox Items to a Text Field in Acrobat Forms
Question details
The user needs to dynamically populate a single text field with a combined list of values from multiple selected check boxes in a PDF form.

- Product
- Adobe Acrobat XI Pro
- Device & OS
- not provided
- Scenario
- Creating a PDF catalog form where selecting products (like books or toys) via checkboxes automatically generates a compiled list in a 'Products to borrow' text box.
- Observed behavior
- The user wants a streamlined way to extract chosen values from checked boxes and display them automatically in a designated read-only text field.
Ensure you have the 'Prepare Form' tool enabled in Acrobat and that each check box in your PDF form has a unique, descriptive field name and export value assigned.
Use a Custom JavaScript Calculation in the Text Field
This method utilizes a field-level custom calculation script within the destination text box to actively read the status of your checkboxes and compile their assigned export values into a single list.
To achieve this, you must first assign an exact 'Export Value' to every check box representing the text you want to display (e.g., 'Red Toy Car'). Then, a script in the text field will scan these boxes and append the text if the box is checked.
Open your PDF in 'Prepare Form' mode. Right-click your first check box, select 'Properties', and go to the 'Options' tab. Under 'Export Value', type the exact name of the item (e.g., 'Book A'). Repeat this for all checkboxes.
While in the 'General' tab of each check box's properties, take note of the exact 'Name' of the field (e.g., 'Check1', 'Check2'). You will need these for the script.
Right-click your destination text field (e.g., 'Products to borrow'), select 'Properties', and navigate to the 'Calculate' tab.
Select the 'Custom calculation script' radio button and click 'Edit'. Enter a JavaScript snippet that retrieves the value of each check box (using this.getField('FieldName').value) and concatenates them into a single string. Click 'OK' to save.
Switch to the 'General' tab of the text field properties and check the 'Read Only' box. This ensures users cannot manually edit or overwrite the automatically generated list.

Easily Create and Edit Interactive PDF Forms with WPS Office
WPS Office features a robust built-in PDF editor that allows you to effortlessly design interactive forms, insert checkboxes, add text fields, and manage form properties without needing overly complex or expensive software.
- 1. Open Your PDF: Launch WPS Office and open your existing PDF document or start a new blank document.
- 2. Access Form Tools: Navigate to the 'Form' tab on the top ribbon to access the interactive form controls.
- 3. Insert Form Fields: Click on 'Check Box' or 'Text Field' and click on the page area where you want to place the interactive element.
- 4. Adjust Properties: Double-click the inserted field to open the properties panel, where you can easily name your fields, set export values, and lock them as read-only.

Frequently Asked Questions
Why is my text field not updating when I click the check box?
Ensure that your custom JavaScript is placed in the 'Calculate' tab of the destination text field, not in the properties of the check box itself. Also, double-check that the field names in your script perfectly match the actual names of your check boxes (they are case-sensitive).
Do export values need to be unique for each check box?
Yes, if you want different text items appended to your text field, each check box should have a unique export value representing that specific item (like 'Book A' or 'Toy B'). If they share the same export value, they will output identical text.
Can I format the combined text as a bulleted list?
Yes. In your JavaScript calculation script, you can insert newline characters ('\n') and bullet point symbols between the retrieved check box values to format the final output. Make sure you check the 'Multi-line' option in the 'Options' tab of your text field properties.
Does this custom JavaScript work in all PDF readers?
While these scripts work perfectly in Adobe Acrobat and Acrobat Reader, some basic web browser PDF viewers (like Chrome or Edge built-in viewers) or third-party mobile apps may not fully support advanced PDF JavaScript calculations.




