PDF Editing Issues

How to Combine Multiple PDF Form Fields into One Field

John WilsonJohn Wilson Nov 3, 2026 869 views

Question details

The user needs to merge text from several source PDF form fields into a single destination field.

How to Combine Multiple PDF Form Fields into One Field
Product
PDF
Device & OS
not provided
Scenario
Creating or editing a PDF form where data from multiple fields needs to be consolidated and displayed on another page or in a single output box.
Observed behavior
The user is looking for the correct procedure and script logic to read source fields and join their values together with appropriate spacing or line breaks.
Before you start

Ensure you have the exact names of the source PDF form fields you want to combine and that your PDF editor supports JavaScript for custom field calculations.

Solution 1Recommended

Create a Calculated Text Field with a Custom Script

Use a custom JavaScript calculation in the destination field to read, format, and combine the values of the source fields.

By setting up a calculation script, the destination field can automatically update its content whenever the user inputs data into the source fields. You can format the combined text using spaces, carriage returns, or line feeds.

1
Access Field Properties

Right-click the destination text field where you want the combined text to appear and select 'Properties' from the context menu.

2
Navigate to the Calculate Tab

In the Text Field Properties dialog box, click on the 'Calculate' tab to view the calculation options.

3
Enable Custom Calculation

Select the 'Custom calculation script' radio button, then click the 'Edit' button to open the JavaScript editor.

4
Enter the JavaScript Code

Input the script to retrieve and join the source fields. For example: `event.value = this.getField('Field1').value + '\n' + this.getField('Field2').value;` to separate them with a line break.

5
Save and Test

Click 'OK' to save your script, then click 'Close' on the Properties window. Enter text into the source fields to verify that the destination field updates correctly.

Create a Calculated Text Field with a Custom Script
Formatting with Paragraphs: If each source field contains a separate paragraph, use two line breaks (\n\n) in your script to maintain clear visual separation between the combined values.
Manage PDF Forms with WPS Office

Edit and Fill PDF Forms Seamlessly with WPS PDF

WPS Office includes a robust PDF editor that allows you to view, fill, and manage PDF forms easily. Handle all your document workflows in one lightweight application.

  1. 1. Download WPS Office: Download and install the free version of WPS Office on your computer.
  2. 2. Open Your PDF Form: Launch WPS PDF and open the interactive PDF form you need to work on.
  3. 3. Fill the Form Fields: Click on the highlighted form fields to enter your information effortlessly.
  4. 4. Save and Export: Once completed, click the 'Save' icon to preserve your filled data, or export the document as needed.
Fill out and save interactive PDF forms with easeModify PDF text, images, and pages directlySeamless compatibility with standard Adobe PDF formatsConvert between PDF and Microsoft Office formats effortlessly
microsoft office alternative - wps office

Frequently Asked Questions

Can I separate combined form fields with spaces instead of line breaks?

Yes, in your custom calculation script, you can concatenate the field values using a space character (e.g., `+ " " +`) instead of a newline character (`\n`).

Why is my calculated field not showing line breaks?

For line breaks to render correctly in the destination field, you must ensure that the 'Multi-line' option is checked in the 'Options' tab of the text field's properties.

Why isn't the destination field updating when I change the source fields?

This is often due to the form field calculation order. You need to ensure that the destination field is calculated after the source fields. Check the calculation order settings in your PDF form editor.