PDF Editing Issues

How to Add 10 Percent to a PDF Form Field When a Checkbox Is Checked

Steve KSteve K Nov 3, 2026 869 views

Question details

The user needs to configure a PDF form to dynamically add a 10% surcharge to a fee when a specific GST checkbox is ticked, based on a value selected from a duration dropdown menu.

How to Add 10 Percent to a PDF Form Field When a Checkbox Is Checked
Product
PDF
Device & OS
not provided
Scenario
Designing an interactive PDF form that requires conditional logic to calculate fees based on user input and checkbox states.
Observed behavior
The form currently lacks the conditional logic to multiply the original fee by 1.10 automatically when the GST checkbox is activated.
Before you start

Ensure you are using a PDF editor that supports advanced form creation and custom JavaScript calculations, and verify the exact field names for your checkbox and fee fields.

Solution 1Recommended

Use Custom JavaScript for Conditional Calculation

Apply a custom JavaScript calculation script to the total field so it reads the checkbox state and applies the 10% calculation accordingly.

Interactive PDF forms rely on JavaScript to handle conditional logic, such as applying a 10% tax only when a checkbox is ticked.

You must also set the calculation order properly in your PDF editor so that the base fee is calculated before the final GST total is applied, preventing incorrect or delayed outputs.

1
Identify Field Names

Open your PDF form in form editing mode and note the exact field names for your base fee (e.g., 'BaseFee'), the checkbox (e.g., 'GSTCheck'), and the final total field.

2
Open Field Properties

Right-click the final total field where the calculated result should appear, select 'Properties', and navigate to the 'Calculate' tab.

3
Enter the JavaScript Code

Select the 'Custom calculation script' option and click 'Edit'. Enter a script that checks the box state. For example: var fee = this.getField('BaseFee').value; var gst = this.getField('GSTCheck').value; if (gst !== 'Off') { event.value = fee * 1.10; } else { event.value = fee; }

4
Adjust Calculation Order

Navigate to the form's 'Calculation Order' settings in your PDF editor. Move the duration and base fee fields to the top of the list so they calculate before the final GST total field.

Use Custom JavaScript for Conditional Calculation
Field Names are Case-Sensitive: Make sure the field names in your JavaScript perfectly match the actual field names in your PDF form, including capitalization, otherwise the script will fail.
Manage PDF Forms with WPS Office

Easily Fill and Manage PDF Forms with WPS PDF

WPS Office provides a comprehensive PDF editor that allows you to interact with, fill, and manage interactive PDF forms effortlessly. Whether you need to input data or review fields containing embedded JavaScript calculations, WPS PDF handles it smoothly.

  1. 1. Download WPS Office: Download and install WPS Office Free from the official website.
  2. 2. Open the PDF Form: Launch WPS PDF and open your interactive PDF document containing the calculated fields.
  3. 3. Interact with Fields: Click on the form fields to enter your data or check boxes like GST. The built-in PDF engine will process embedded calculations automatically.
  4. 4. Save Your Data: Click the 'Save' button to securely store your filled PDF form without losing any calculated data.
Seamlessly fill out and interact with complex PDF formsHigh compatibility with standard PDF interactive features and calculationsLightweight, fast, and free PDF viewing and editing alternativeCross-platform support for Windows, Mac, and mobile devices
microsoft office alternative - wps office

Frequently Asked Questions

Why is my PDF form not updating the total automatically when I check the box?

This usually happens if the form's calculation order is incorrect. Ensure that the base fee and duration fields are set to calculate before the final total field in your PDF editor's calculation order settings.

Do I need to know JavaScript to create conditional PDF forms?

Yes, applying conditional logic like adding 10 percent based on a checkbox state requires writing a custom JavaScript calculation script in standard PDF form editors.

What should the export value of my checkbox be in the script?

By default, PDF checkboxes often have an export value of 'Yes' when checked and 'Off' when unchecked. You must verify this export value in the checkbox properties and reference it accurately in your JavaScript code.

Can I use basic math operations instead of JavaScript for conditional taxes?

No, standard pre-built PDF calculations only support basic operations like sum, product, or average across selected fields. Conditional operations strictly require custom JavaScript to function.