How to Lock Duplicate Acrobat Form Fields After Copying a Value
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.

- 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.
Ensure your PDF editing software supports JavaScript custom calculation scripts and allows you to configure advanced form field properties.
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.
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.
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.
In the Properties menu for the destination field, navigate to the "Calculate" tab. Select the "Custom calculation script" option and click "Edit".
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.

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. 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. Open Your Form: Click "Open" to browse your files and select the interactive PDF document you want to fill or manage.
- 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.

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.




