PDF Editing Issues

How to Calculate 15% GST in Adobe Acrobat Based on a Checkbox Selection

Jason MillerJason Miller Nov 3, 2026 869 views

Question details

The user needs to configure a PDF form to dynamically calculate a 15% GST based on a cost field, but only if a specific checkbox is toggled on.

How to Calculate 15% GST in Adobe Acrobat Based on a Checkbox Selection
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Creating an interactive PDF form that requires conditional tax calculations tied to user selections.
Observed behavior
The target field should output exactly 15% of the cost field when the checkbox is selected, and return zero when the checkbox is cleared or an alternative option is selected.
Before you start

Ensure you are using Adobe Acrobat Pro, as the free Adobe Reader does not allow you to author forms or add custom JavaScript calculation scripts. Identify the exact field names for your cost input and checkbox before proceeding.

Solution 1Recommended

Apply a Custom JavaScript Calculation Script

Use a custom JavaScript condition within the text field properties to evaluate the checkbox state and calculate the GST accordingly.

Because this calculation requires a specific condition (verifying if a box is ticked), standard built-in Acrobat calculations are insufficient. You must implement a simple JavaScript statement to evaluate the checkbox's value dynamically.

1
Enter Prepare Form Mode

Open your PDF document in Adobe Acrobat, navigate to the Tools menu, and select 'Prepare Form' to enable form editing.

2
Open Target Field Properties

Right-click the text field where you want the GST value to be displayed (for example, 'GSTRow1') and select 'Properties' from the context menu.

3
Add Custom Calculation Script

Navigate to the 'Calculate' tab in the Properties window. Select the 'Custom calculation script' radio button, then click the 'Edit' button.

4
Insert the JavaScript Code

Enter the following script: event.value = (this.getField("CB1").valueAsString == "Off") ? 0 : Number(this.getField("CostRow1").valueAsString) * 0.15; (Make sure to replace "CB1" and "CostRow1" with your actual field names).

5
Save and Test

Click 'OK' to save the script, then click 'Close' to exit the Properties window. Preview your form and toggle the checkbox to verify the GST calculates correctly based on the cost input.

Apply a Custom JavaScript Calculation Script
Field Name Consistency: JavaScript is case-sensitive. Ensure that the field names referenced in your script match the exact spelling and capitalization of your actual checkbox and cost fields.
Free Microsoft Office alternative

Manage and Fill PDF Forms Easily with WPS Office

While Adobe Acrobat provides advanced JavaScript form controls, WPS Office offers a comprehensive, lightweight, and highly compatible PDF editor. Whether you need to view, fill forms, add signatures, or convert PDFs, WPS Office handles it seamlessly without heavy subscription fees.

  1. 1. Download the Software: Visit the official WPS website to download and install WPS Office for free on your device.
  2. 2. Open Your PDF: Launch WPS Office and drag your PDF document into the workspace, or use the 'Open' button to select it.
  3. 3. Interact with Forms: Navigate to the 'Fill & Sign' or 'Form' tab on the top ribbon to easily interact with checkboxes, text fields, and signatures.
Fully compatible with standard PDF formats, Microsoft Word, Excel, and PowerPoint files.Lightweight design ensuring fast loading speeds for complex and large PDF documents.Easily fill out interactive PDF forms, add text fields, and insert secure digital signatures.Free built-in PDF to Word/Excel conversion tools to streamline data extraction and editing.
microsoft office alternative - wps office

Frequently Asked Questions

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

In Adobe Acrobat, automatic calculations might be disabled in your global settings. Go to Edit > Preferences > Forms, and ensure that the 'Automatically calculate field values' option is checked.

Can I use standard basic calculations instead of JavaScript for a checkbox toggle?

No. Basic built-in calculations in Acrobat (such as sum or product) apply to all specified fields unconditionally. Conditional logic, like checking a checkbox state before applying a math formula, strictly requires a custom JavaScript script.

How do I know what value my checkbox returns when it is unchecked?

By default, an unchecked box in an Adobe Acrobat PDF form evaluates to the string 'Off'. You can verify the checked export value (usually 'Yes' or 'On') by right-clicking the checkbox, selecting Properties, and checking the Options tab.