How to Add Manual Overrides to Automatically Calculated PDF Form Fields
Question details
The user wants to configure a calculated PDF form field so that it displays an automatic mathematical result by default, but also allows an authorized user to bypass the formula and input a custom value manually.

- Product
- PDF Editor
- Device & OS
- not provided
- Scenario
- Creating or editing an interactive PDF form that requires both automatic calculations and occasional manual data entry for exceptions.
- Observed behavior
- By default, standard calculated fields do not accept direct manual input because the calculation formula constantly overwrites any typed data. The user needs a method to toggle or separate the automatic result from a manual entry.
Ensure you are using a comprehensive PDF editor that supports advanced form creation and JavaScript editing, as basic PDF viewers cannot configure form calculation logic.
Use a Custom Calculation Script with a Checkbox Override
This method utilizes a checkbox to act as a toggle switch between the automatic calculation script and manual keyboard input.
By linking a checkbox to your calculated field using JavaScript, you can instruct the PDF to run the mathematical formula when unchecked, or pause the calculation and accept custom text input when checked.
Open your PDF in form editing mode. Insert a Check Box field near your calculated value and name it 'OverrideCheck'.
Double-click the text field where the result will display (e.g., 'TotalValue') to open its Properties dialog.
Navigate to the 'Calculate' tab, select 'Custom calculation script', and click 'Edit'. Enter a JavaScript code snippet that checks the state of 'OverrideCheck'. If the box is unchecked, the script should perform the math; if checked, the script should do nothing, allowing the user to type manually.
Exit form editing mode and use the Hand/Select tool. Verify that when the box is unchecked, the field calculates automatically, and when checked, you can type a custom number without it being overwritten.

Provide Separate Fields for Calculated and Manual Inputs
A simpler alternative that avoids complex JavaScript by offering users two distinct form fields.
Easily Create and Manage Interactive PDF Forms in WPS Office
WPS Office provides robust PDF editing tools that allow you to insert, configure, and manage interactive form fields, ensuring your documents capture exactly the data you need.
- 1. Open Your PDF: Launch WPS Office and open the PDF document you want to turn into a fillable form.
- 2. Access Form Tools: Navigate to the 'Form' tab located in the top ribbon menu to reveal form creation controls.
- 3. Insert Form Controls: Click on 'Text Field', 'Check Box', or other form controls and drag them onto your document page.
- 4. Configure Field Properties: Double-click any inserted field to open the Properties menu, where you can set up calculations, formatting, and read-only statuses.

Frequently Asked Questions
Why can't I type into my calculated PDF field directly?
Calculated fields are designed to constantly update based on a mathematical formula. Whenever you type into one, the form's calculation engine immediately triggers and overwrites your manual entry with the calculated result. An override script or separate field is required to prevent this.
Will manual form overrides work in all PDF viewers?
Custom calculation scripts and override checkboxes work best in dedicated standard PDF readers like Adobe Acrobat, WPS PDF, and Foxit. Simple built-in browser PDF viewers (like Chrome or Edge) sometimes do not execute form JavaScript properly.
How do I clear a manual override and revert to the calculation?
If you used a checkbox override method, simply unchecking the box will usually trigger the script to recalculate the original formula and overwrite your manual entry with the correct automatic total.
Can I use a dropdown menu instead of a checkbox to trigger an override?
Yes, you can configure a dropdown menu so that selecting a specific option (such as 'Custom Pricing') triggers a JavaScript condition that halts the automatic calculation and enables manual data entry in your target field.




