How to Calculate 15% GST in Adobe Acrobat Based on a Checkbox Selection
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.

- 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.
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.
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.
Open your PDF document in Adobe Acrobat, navigate to the Tools menu, and select 'Prepare Form' to enable form editing.
Right-click the text field where you want the GST value to be displayed (for example, 'GSTRow1') and select 'Properties' from the context menu.
Navigate to the 'Calculate' tab in the Properties window. Select the 'Custom calculation script' radio button, then click the 'Edit' button.
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).
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.

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. Download the Software: Visit the official WPS website to download and install WPS Office for free on your device.
- 2. Open Your PDF: Launch WPS Office and drag your PDF document into the workspace, or use the 'Open' button to select it.
- 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.

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.




