How to Autofill PDF Form Fields from a Previous Page in Adobe Acrobat
Question details
The user needs to copy an answer from a form field on one page into another form field automatically when a checkbox is clicked.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Creating interactive PDF forms where identical information needs to be duplicated across multiple pages without manual re-entry.
- Observed behavior
- The user requires a specific setup or script to trigger the data transfer between the source field and the target field using a checkbox.
Ensure you have access to the 'Prepare Form' tools in your PDF editor and note down the exact names of the source field and the target field you wish to link.
Use a MouseUp JavaScript Action on a Checkbox
Add a custom JavaScript code to the checkbox's properties to automatically fetch and copy the field value.
By applying a simple JavaScript to a checkbox, you can command the PDF to duplicate content from one specific field to another instantly when the user checks the box.
Open your PDF in Adobe Acrobat, go to the 'Tools' menu, and select 'Prepare Form' to enable form editing.
Right-click the checkbox you want to use as the trigger and select 'Properties' from the context menu.
Navigate to the 'Actions' tab. In the 'Select Trigger' drop-down, choose 'Mouse Up'. In the 'Select Action' drop-down, choose 'Run a JavaScript', then click 'Add'.
In the JavaScript Editor window, paste the following code: if (event.target.value != 'Off') this.getField('TargetField').value = this.getField('SourceField').value;
Replace 'TargetField' and 'SourceField' in the code with the exact names of your actual form fields. Click 'OK' to save the script, close the properties window, and test your form.

Fill and Manage PDF Forms Seamlessly with WPS Office
If you need a fast and reliable way to fill out interactive PDF forms, sign documents, and edit pages, WPS Office offers a comprehensive PDF toolkit that works right out of the box.
- 1. Open WPS PDF: Launch WPS Office and click on 'PDF' to open the dedicated PDF reader and editor.
- 2. Load Your Form: Click 'Open PDF' and select the interactive PDF form you need to fill out.
- 3. Fill the Data Directly: Click on any text field or checkbox to enter your data; WPS PDF automatically highlights fillable areas for easy navigation.
- 4. Save or Export: Once complete, click the 'Save' icon or export the filled PDF to securely preserve your entered form data.

Frequently Asked Questions
Can I autofill PDF fields across pages without using JavaScript?
Yes. If you simply give multiple form fields the exact same name in your PDF editor's form properties, whatever data the user types into one field will automatically populate all other fields sharing that identical name.
Why isn't my JavaScript copying the form field data when I check the box?
This is usually caused by a typo in the field names. Double-check that 'SourceField' and 'TargetField' in your code match the exact names of your fields in the form properties, including capital letters and spaces.
How do I clear the target field if the checkbox is unchecked again?
You can expand your script with an 'else' statement. For example: if (event.target.value != 'Off') { this.getField('TargetField').value = this.getField('SourceField').value; } else { this.getField('TargetField').value = ''; }.
Does this autofill script work on mobile PDF viewers?
Not consistently. While custom JavaScript runs perfectly on desktop PDF software like Adobe Acrobat, many default mobile PDF readers restrict or disable JavaScript execution, meaning the autofill checkbox may not trigger on smartphones or tablets.




