How to Copy a PDF Form Field Value While Keeping It Editable
Question details
The user needs to copy the value of one PDF form field into a second field automatically, but wants to retain the ability to manually edit the second field without it being overwritten.

- Product
- PDF Editor
- Device & OS
- not provided
- Scenario
- Creating or editing interactive PDF forms where certain fields need to share initial data but remain independently editable.
- Observed behavior
- Using a standard calculation script on the second field continuously overwrites any manual changes made by the user.
Ensure you have a PDF editor that supports JavaScript or custom validation scripts for form fields, and note the exact names of your source and destination fields.
Use a Custom Validation Script on the Source Field
This method copies the data only when the original field is updated, leaving the destination field free for manual edits.
When you use a calculation script on a destination field, it constantly recalculates and overwrites manual inputs. By moving the logic to the source field's validation event, the copy action only triggers when the source field is modified.
Right-click the original source field (e.g., 'Full_Name') and select 'Properties' from the context menu.
In the Properties dialog box, go to the 'Validate' tab to set up a custom trigger.
Select 'Run custom validation script' and enter the following code: `this.getField("Full_Name2").value = event.value;` (Replace 'Full_Name2' with the exact name of your destination field).
Ensure that the destination field ('Full_Name2') does NOT have any calculation scripts applied to it, as they will cause the field to reset.

Create and Manage Interactive PDF Forms with WPS Office
WPS Office provides robust PDF editing tools, making it easy to create interactive forms, add text fields, and manage field properties without needing complex setups.
- 1. Open the PDF File: Launch WPS Office and open your PDF document.
- 2. Access the Form Menu: Navigate to the 'Form' tab in the top ribbon to view all form creation tools.
- 3. Edit Field Properties: Double-click any form field to open its properties, where you can adjust its appearance, format, and interactive behaviors.

Frequently Asked Questions
Why does my second PDF field keep reverting to the original value?
If you have a calculation script set on the second field, it will trigger every time the form calculates, overwriting your manual edits. Remove the calculation script and use a validation script on the first field instead.
Do I need to know JavaScript to create linked PDF form fields?
While basic field linking doesn't require programming, adding conditional behaviors—like copying a value while keeping it editable—requires a simple one-line JavaScript snippet in the field's validation properties.
Can I link more than two form fields using this method?
Yes. You can expand the custom validation script on the source field to update multiple destination fields by adding additional `this.getField("FieldName").value = event.value;` lines for each respective field.




