PDF Editing Issues

How to Hide Zero Values and Field Highlights in PDF Forms

John WilsonJohn Wilson Nov 5, 2026 869 views

Question details

The user needs to prevent calculated PDF form fields from showing $0.00 when referenced fields are empty and wants to disable the blue highlight color that appears on fields during viewing or editing.

How to Hide Zero Values and Field Highlights in PDF Forms
Product
PDF Forms
Device & OS
not provided
Scenario
Creating or filling out a calculated PDF form where empty inputs result in unwanted zero currency values, accompanied by distracting blue highlights on the form fields.
Observed behavior
Calculated fields display $0.00 instead of remaining blank, and the PDF reader applies a persistent blue highlight overlay to all fillable form fields.
Before you start

Ensure you have editing permissions for the PDF document and are familiar with accessing form field properties to input custom calculation or validation scripts.

Solution 1Recommended

Use a Custom Calculation Script to Hide Zero Values

Apply a simple JavaScript logic to your calculated field to return a blank space instead of a zero when the source field is empty.

By default, PDF form calculations treat empty source fields as zero, which formats as $0.00 in currency fields. A custom calculation script overrides this behavior to evaluate if the source field is empty.

1
Access Field Properties

Right-click the calculated form field displaying the zero value and select 'Properties'.

2
Navigate to the Calculate Tab

In the Properties dialog box, go to the 'Calculate' tab and select the 'Custom calculation script' option.

3
Enter the JavaScript

Click 'Edit' and enter the following script (replace "Text1" with the actual name of your source field): var cal = this.getField("Text1").value; event.value = cal == "" ? "" : cal;

4
Save Changes

Click 'OK' and close the properties window. The field will now remain blank when the referenced field is empty.

Use a Custom Calculation Script to Hide Zero Values
Advanced PDF Form Editing

Create and Manage Advanced PDF Forms with WPS Office

WPS Office provides a comprehensive PDF editor that lets you easily manage interactive form fields, apply custom calculation scripts to hide zero values, and adjust form aesthetics smoothly without heavy subscription costs.

  1. 1. Open Your PDF Form: Launch WPS Office and open the PDF document containing your form fields.
  2. 2. Access Form Tools: Navigate to the 'Form' tab on the top ribbon to access all interactive field customization tools.
  3. 3. Modify Field Properties: Double-click any calculated field to open its Properties dialog, where you can easily paste custom calculation scripts to hide zero values.
Easily add, edit, or customize fillable PDF form fields.Full support for standard PDF form JavaScript calculations and validations.Fully compatible with Adobe PDF formats across all devices.Lightweight application with a highly intuitive user interface.
microsoft office alternative - wps office

Frequently Asked Questions

Can I hide the blue highlight color for all users viewing my PDF form?

The blue field highlight is typically a user-level preference set within their specific PDF reader software. While you can use document-level JavaScript to toggle the 'app.runtimeHighlight' property when the document opens, it's generally best practice to respect the user's local application settings, as forcing it off may reduce accessibility for some users.

Why does my calculated PDF field show $0.00 by default?

When form fields are formatted as currency or numbers, an empty source field is often treated mathematically as a zero during calculations. Without a specific script instructing the field to remain blank, the PDF reader automatically formats that zero according to your field rules, resulting in $0.00.

Will these JavaScript calculation scripts work in all PDF readers?

Custom calculation and validation scripts work perfectly in fully-featured desktop PDF editors like Adobe Acrobat and WPS Office. However, some basic web browsers, built-in system previewers, or simple mobile PDF viewers do not fully support JavaScript, which may prevent the calculations from running properly.