Let Users Override a Calculated Form Field in Adobe Acrobat
Question details
Allow users to manually enter an IP address without having an Acrobat form calculation replace it on unrelated recalculations.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- A PDF form automatically populates an IP address based on a workstation-name field, but users also need to enter an IP address manually.
- Observed behavior
- The automatic population script can overwrite a manual IP address when the form recalculates or a dependent field changes.
Open the PDF in Acrobat and identify the exact name of the workstation field and the IP address field that contains the calculation script. Confirm that the IP address field is not set to Read Only.
Run the IP address calculation only when the workstation field triggers it
Use this condition to prevent unrelated field changes from rerunning the automatic population code.
In Adobe Acrobat, open the PDF and select Prepare a form from the tools.
Right-click the IP address field, select Properties, and open the Calculate tab. Select the option for a custom calculation script and click Edit.
Wrap the existing automatic population code in a source check: if (event.source != null && event.source.name == "WS Name1") { /* existing population code */ }. Replace WS Name1 with the exact name of your workstation field, and keep any assignment to event.value inside the condition.
Save the PDF and test the form: change the workstation field to trigger automatic population, then enter an IP address manually and change an unrelated field. Confirm that the manual entry remains.

Work with PDFs and Office files in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for working with PDFs and Microsoft Office files. It supports a straightforward move between common file formats, but it does not modify Acrobat's form calculation scripts.

Frequently Asked Questions
Where do I find the IP address field's calculation script?
In Acrobat, open Prepare a form, right-click the IP address field, and select Properties. On the Calculate tab, open the custom calculation script using Edit.
Why does the condition check whether event.source is null?
Some calculation events may not have a source field. Checking event.source != null before accessing its name avoids trying to read a property from a null value.
Will a manual IP address survive a change to the workstation name?
Not necessarily. The guarded population code still runs when the named workstation field triggers the calculation, so it may replace the manual IP address.
What should I check if the field still overwrites manual entries?
Check the Calculate script for assignments outside the condition, and inspect other field or document scripts that write to the IP address field. Also confirm that the source field name exactly matches the name in the condition.




