PDF Editing Issues

How to Override a Calculated Form Field with Manual Input in Acrobat

Elise WilliamsElise Williams Nov 3, 2026 868 views

Question details

The user needs a way to combine separate input fields into a calculated full-name field in a PDF form while still allowing users to manually override the result without it being automatically erased.

How to Override a Calculated Acrobat Form Field with Manual Input
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Creating or modifying an interactive PDF form with dynamic calculated fields.
Observed behavior
By default, calculated fields continuously evaluate and overwrite any manual input. The goal is to make the manual input persist unless the original source fields are explicitly edited again.
Before you start

Ensure you have access to the 'Prepare Form' tool in Adobe Acrobat and that you know the exact names of the source fields you want to combine.

Solution 1Recommended

Update the Custom Calculation Script

Modify the calculation script to check the event source, ensuring it only generates the combined string when the specific source fields trigger the event.

Standard calculated fields evaluate constantly, which causes them to immediately erase any manual overrides. By checking 'event.source.name', you restrict the calculation so it only triggers when the individual name fields are edited. This allows a manually typed full name to remain intact.

1
Open Form Preparation

Open your PDF in Adobe Acrobat, navigate to the Tools menu, and select 'Prepare Form'.

2
Access Field Properties

Right-click on the calculated target field (e.g., the Full Name field) and choose 'Properties'.

3
Enable Custom Calculation

Go to the 'Calculate' tab and select the 'Custom calculation script' radio button.

4
Insert the JavaScript Code

Click 'Edit' and enter the following script, replacing the field names with your exact field names: if (event.source && (event.source.name == "Patient First Name" || event.source.name == "Patient Middle Initial" || event.source.name == "Patient Last Name")) event.value = this.getField("Patient First Name").value + " " + this.getField("Patient Middle Initial").value + " " + this.getField("Patient Last Name").value;

5
Save and Test

Click 'OK' to save the script, close the properties dialog, and test the form by filling out the source fields and then attempting a manual override.

Update the Custom Calculation Script
Subsequent Edits Warning: If a user enters a manual override and later returns to edit one of the original source fields, the calculation script will trigger again and overwrite the manual value.
Free Microsoft Office alternative

Edit PDFs and Manage Forms Easily with WPS Office

While complex JavaScript programming requires specialized PDF developer tools, WPS Office provides a lightweight, intuitive, and highly compatible PDF editor for everyday document workflows. Read, edit, fill out forms, and manage your PDFs seamlessly alongside your standard office documents.

Lightweight and free PDF editing and form filling capabilitiesSeamless compatibility with standard PDF formats and Microsoft Office documents (Word, Excel, PowerPoint)Familiar user interface that makes transitioning effortless and boosts productivity
microsoft office alternative - wps office

Frequently Asked Questions

Can I use standard math calculations and still allow manual overrides?

Using predefined calculation options (like 'Value is the sum of') will constantly recalculate. To allow manual overrides for math functions, you must also use a custom calculation script that checks the event source.

Why doesn't the script work when I preview the form?

Ensure that the field names in your JavaScript perfectly match the actual names of your form fields, including spaces and capitalization. Also, verify that JavaScript is enabled in Acrobat's preferences.

How can I prevent the script from overwriting a manual entry entirely?

You would need to write a more complex script that checks if the target field has already been manually modified, potentially by storing a flag or comparing the current value against the expected calculated value, though this is significantly more advanced.