PDF Editing Issues

How to Increase a PDF Form Field Value by 20 Percent

Bushra ParveenBushra Parveen Oct 28, 2026 869 views

Question details

The user needs to automatically add a 20 percent tax to an entered fabrication price within a PDF form field.

How to Increase a PDF Form Field Value by 20 Percent
Product
PDF
Device & OS
not provided
Scenario
Setting up a PDF inspection form that requires automatic tax calculation on a manually entered price value.
Observed behavior
The form needs to take an entered base value (e.g., 100) and automatically output the final total with a 20% tax included (e.g., 120).
Before you start

Ensure you have access to advanced PDF form editing tools and JavaScript editing features in your PDF software before proceeding.

Solution 1Recommended

Use a Custom Validation Script for Automatic Calculation

Apply a simple JavaScript validation script to the form field to automatically multiply the entered value by 1.2.

By using a custom validation script, the PDF form will automatically intercept the value entered by the user, multiply it by the desired percentage, and display the final total in the same field.

1
Open form properties

Open the PDF document in prepare form mode, right-click the target text field, and select 'Properties'.

2
Navigate to the Validate tab

In the Text Field Properties dialog box, click on the 'Validate' tab.

3
Add custom script

Select the 'Run custom validation script' option and click the 'Edit' button.

4
Enter the calculation code

Input the following JavaScript code: if (event.value) event.value = Number(event.value) * 1.2; and click 'OK' to save.

Use a Custom Validation Script for Automatic Calculation
Data Transparency: While this script works, it overwrites the original entered value. For clearer data handling, consider using separate fields for the base price and total.
Professional PDF Editor

Create and Manage PDF Forms Easily with WPS Office

WPS Office features a powerful PDF editor that allows you to easily create, edit, and manage interactive PDF forms, including custom field calculations and scripts.

  1. 1. Open PDF in WPS Office: Launch WPS Office and open your PDF form document.
  2. 2. Access Form Tools: Navigate to the 'Form' tab on the top ribbon to access the interactive form creation tools.
  3. 3. Edit Field Properties: Double-click any form field to open its properties menu and configure calculations or validation scripts.
  4. 4. Save and Distribute: Save your document. The interactive calculations will function smoothly for anyone filling out the form.
Fully compatible with Adobe Acrobat PDF forms and standard JavaScript calculations.Easily insert interactive text fields, checkboxes, and dropdown menus.Lightweight, fast, and completely free to download.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my PDF form calculation showing the wrong total?

This is typically caused by an incorrect calculation order. To fix this, open your form editing tools, navigate to the calculation order settings, and ensure the fields calculate in the logical sequence (e.g., Price first, then Tax, then Total).

Can I perform basic calculations without using JavaScript?

Yes. In the field properties under the 'Calculate' tab, you can select 'Value is the' and choose basic operations like Sum, Product, Average, Minimum, or Maximum for selected fields without writing code.

Do PDF form calculations work on mobile devices?

Basic calculations usually work on modern mobile PDF viewers, but complex custom JavaScript validations may not be supported on default mobile apps. Users are recommended to use a dedicated PDF reader app like WPS Office on their mobile devices for full form functionality.