How to Combine PDF Form Fields into a Single Full Name
Question details
The user wants to automatically merge the input from a first-name field and a last-name field into a single full-name calculated field within a PDF form.

- Product
- Adobe Acrobat / PDF Form Editors
- Device & OS
- not provided
- Scenario
- Creating or modifying a fillable PDF form where user input from multiple text fields needs to be consolidated into one summary field.
- Observed behavior
- The user successfully combined the fields using a JavaScript calculation script but encountered a secondary issue with synchronized radio buttons duplicating actions across pages.
Verify the exact text field names (case-sensitive) for the first name and last name fields in your PDF document, as you will need to reference them perfectly in your script.
Combine PDF Fields Using Custom Calculation Script
Use a custom JavaScript in the PDF field properties to automatically fetch and combine strings from the target fields.
In advanced PDF form editors, text fields can be programmed to automatically calculate or merge values based on user input from other fields. By writing a simple script, you can concatenate the first and last name while adding a space between them.
Right-click the destination text field (the Full Name field) and select 'Properties' from the context menu.
Click on the 'Calculate' tab located at the top of the Text Field Properties dialog box.
Select the 'Custom calculation script' radio button and click the 'Edit' button. Enter the following script, replacing the names in parentheses with your exact field names: event.value = this.getField('FIRST NAME').valueAsString + ' ' + this.getField('LAST NAME').valueAsString;
Click 'OK' to save the script, then close the properties window. Switch to Preview or Form Fill mode, and type names into the first and last name fields to verify they merge correctly.

Easily Fill and Manage PDF Forms with WPS Office
While advanced JavaScript calculation setups might require professional authoring tools, WPS Office provides a powerful, intuitive PDF editor to fill, manage, and interact with complex PDF forms instantly.
- 1. Open PDF File: Launch WPS Office and open your fillable PDF document.
- 2. Access Form Tools: Navigate to the 'PDF' tab and click on the 'Form' feature to activate form interaction.
- 3. Fill the Data: Click directly into the text fields, such as 'First Name' and 'Last Name', and input your desired data.
- 4. Save Document: Once completed, click 'Menu' and select 'Save' to ensure your form data is locked in and ready to share.

Frequently Asked Questions
Why is the combined full name field not updating instantly?
The calculation may not trigger until you click outside the input field or press Enter. Additionally, check your form's calculation order to ensure the source fields are processed before the combined destination field.
How do I add a comma between the last name and first name?
Adjust your calculation script to insert a comma and a space. For example: event.value = this.getField('LAST NAME').valueAsString + ', ' + this.getField('FIRST NAME').valueAsString;
Can I copy a radio button group without linking the options?
No, copying a radio button directly duplicates its field name, which automatically links the options as a mutually exclusive group across the document. To create an identical but independent radio button group, you must manually create new buttons and assign them a completely unique field name.




