Fix Acrobat PDF Form Error: Value Does Not Match Format
Question details
The user encounters a format mismatch error in Adobe Acrobat when clearing data in calculated PDF form fields.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Clearing data in source fields that are linked to a calculated PDF form field.
- Observed behavior
- An error message pops up stating 'The value entered does not match the format of the field', caused by the script attempting to divide by an empty or zero value.
Ensure you have access to the Prepare Form tool in Acrobat to edit the PDF's JavaScript calculations, and save a backup copy of your document before modifying field properties.
Add a Conditional Check to the Calculation Script
Modify the custom calculation script to verify that the denominator is not zero or empty before executing the division.
When you clear form fields in Acrobat, the underlying value often defaults to zero or an empty string. If another field calculates a percentage or ratio using these cleared fields, the script attempts to divide by zero. This results in an invalid output (NaN or Infinity), which Acrobat flags as a format mismatch if the field is formatted strictly as a number or percentage.
Open your document in Acrobat, go to the 'Prepare Form' mode, right-click the calculated form field displaying the error, and select 'Properties'.
Navigate to the 'Calculate' tab in the Properties window, ensure the 'Custom calculation script' option is selected, and click the 'Edit' button.
Modify your script to check the denominator. For example: var num = this.getField('Numerator').value; var den = this.getField('Denominator').value; if (den == 0 || den == '') { event.value = ''; } else { event.value = num / den; }
Click 'OK' to close the JavaScript editor and the Properties window. Clear the source fields in your form to verify that the error no longer appears.

Edit and Fill PDF Forms Smoothly with WPS Office
Looking for an easier way to manage PDF forms without encountering complex scripting errors? WPS Office provides a robust, intuitive PDF editor that allows you to seamlessly fill, edit, and manage PDF documents. It is a lightweight, all-in-one solution for handling your daily document workflows.
- 1. Download and Install: Download WPS Office from the official website and open the WPS PDF module.
- 2. Open Your PDF: Click 'Open' to load your interactive PDF form into the workspace.
- 3. Fill and Edit: Navigate to the 'Form' tab to fill out fields, add text, or manage document data effortlessly.
- 4. Save Your Document: Click the 'Save' icon or press Ctrl+S to preserve your completed form securely.

Frequently Asked Questions
Why does Acrobat say the value does not match the format?
This usually occurs when a field is specifically formatted to display a certain data type (like a Number or Percentage), but a calculation error—such as dividing by zero—results in a non-numeric value that violates this format.
Can I use simple field notation instead of JavaScript to fix this division error?
No, simple field notation does not support conditional logic (like checking if a field is zero or empty). You must use a Custom Calculation Script in JavaScript to prevent division-by-zero errors.
Does this calculation error affect printing or exporting the PDF?
While it may not prevent the document from printing, the error popup is highly disruptive for users filling out the form, and the affected field will typically display a blank or incorrect value in the exported document.
How do I access the Prepare Form tool in Adobe Acrobat?
Go to the 'Tools' tab at the top of the Acrobat window, locate the 'Forms & Signatures' category, and click on 'Prepare Form' to enable form editing and access field properties.




