PDF Editing Issues

How to Combine PDF Form Fields into a Single Full Name

Khadija KhanKhadija Khan Oct 28, 2026 868 views

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.

How to Combine Two PDF Form Fields into One Full Name
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.
Before you start

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.

Solution 1Recommended

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.

1
Open Field Properties

Right-click the destination text field (the Full Name field) and select 'Properties' from the context menu.

2
Navigate to Calculation Options

Click on the 'Calculate' tab located at the top of the Text Field Properties dialog box.

3
Apply Custom Script

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;

4
Test the Form

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.

Combine PDF Fields Using Custom Calculation Script
Managing Duplicate Form Controls: If you are working with radio buttons or checkboxes across multiple pages, controls with the exact same name and export values will act as one mutually exclusive group. To allow independent selections on different pages, assign unique field names to the duplicated buttons.

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. 1. Open PDF File: Launch WPS Office and open your fillable PDF document.
  2. 2. Access Form Tools: Navigate to the 'PDF' tab and click on the 'Form' feature to activate form interaction.
  3. 3. Fill the Data: Click directly into the text fields, such as 'First Name' and 'Last Name', and input your desired data.
  4. 4. Save Document: Once completed, click 'Menu' and select 'Save' to ensure your form data is locked in and ready to share.
Fully compatible with standard interactive PDF formsEasily type, fill, and modify text fields on the goCross-platform support for Windows, Mac, Android, and iOSLightweight, fast, and secure document processing
microsoft office alternative - wps office

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.