PDF Editing Issues

How to Lock Duplicate Acrobat Form Fields After Copying a Value

Natalie TaylorNatalie Taylor Nov 5, 2026 870 views

Question details

The user needs a method to populate several duplicate form fields from a single source field while locking the destination fields so users cannot manually edit them.

How to Lock Duplicate Form Fields After Copying Values in PDF
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Creating an interactive PDF form where repeating information only needs to be entered once, ensuring the copied values remain secure and uneditable elsewhere in the document.
Observed behavior
Destination form fields require unique names, read-only properties, and a custom JavaScript calculation script to properly fetch and lock the value from the source field.
Before you start

Ensure your PDF editing software supports JavaScript custom calculation scripts and allows you to configure advanced form field properties.

Solution 1Recommended

Configure Read-Only Fields and Custom Calculation Scripts

By giving fields distinct names, setting the destination fields to read-only, and applying a custom calculation script, you can automatically and securely populate data across your PDF.

If multiple form fields share the exact same name, they act as direct mirrors and cannot be locked individually. To lock the destination fields, you must rename them to be unique before applying the script.

1
Assign Unique Names to Fields

Open your PDF form editor. Ensure that your source field (e.g., "Text1") and your destination fields (e.g., "Text2", "Text3") all have completely distinct names.

2
Enable Read-Only Settings

Right-click on your first destination field and select "Properties". Navigate to the "General" tab and check the "Read Only" checkbox. Repeat this for all destination fields.

3
Apply the Custom Script

In the Properties menu for the destination field, navigate to the "Calculate" tab. Select the "Custom calculation script" option and click "Edit".

4
Enter the JavaScript Code

Type the following code into the script window: event.value = this.getField("Text1").value; (Be sure to replace "Text1" with the actual name of your source field), then click "OK" and save your PDF.

Configure Read-Only Fields and Custom Calculation Scripts
Adding Placeholder Instructions: If you want the locked fields to display instructions when the source is empty, use an if/else script: if (this.getField("Text1") != null && this.getField("Text1").value != "") { event.target.value = this.getField("Text1").value; } else { event.value = "Complete field 1 first"; }

Easily Manage and Protect PDFs with WPS Office

While advanced JavaScript form coding requires specific software, WPS PDF offers an incredibly intuitive and lightweight solution for viewing, filling, and securing your PDF forms and documents on any device.

  1. 1. Launch WPS PDF: Open WPS Office on your computer or mobile device and click on the "PDF" tab to launch the dedicated PDF editor.
  2. 2. Open Your Form: Click "Open" to browse your files and select the interactive PDF document you want to fill or manage.
  3. 3. Fill and Secure: Use the "Form" tab to interact with fields, and navigate to the "Protect" tab if you need to restrict editing or encrypt the document before sharing.
Intuitive tools for filling and managing interactive PDF forms securelySeamlessly compatible with all standard Microsoft Office formats and Adobe PDF filesLightweight, fast-loading application that saves device storage and memoryBuilt-in document protection and read-only encryption features
microsoft office alternative - wps office

Frequently Asked Questions

Why do all duplicate PDF fields change when I type in one?

This happens when multiple form fields share the exact same name. Acrobat treats identically named fields as duplicates that mirror each other's data and properties. To lock specific destination fields, you must give them unique names.

Does the custom calculation script update in real-time?

Yes, PDF calculation scripts trigger automatically when the source field's value changes or when you click outside the source field after typing, instantly updating the read-only destination fields.

Can I change the text color for the placeholder text?

Yes. Inside a custom script, you can use the event.target.textColor property to set different colors. For example, use color.ltGray for placeholder text when the field is empty, and color.black when the actual value is copied over.