How to Calculate Different Loan Percentages in an Acrobat PDF Form
Question details
The user needs to configure a fillable PDF form to automatically display a specific percentage (80% or 75%) based on the inputted loan amount.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Creating a dynamic financial PDF form where a percentage field updates conditionally based on the value entered in a 'Loan Amount' field.
- Observed behavior
- The calculated field requires custom JavaScript to evaluate the loan amount tier and output the correct text or numeric percentage.
Ensure you have a PDF editor that supports form field creation and custom JavaScript execution, such as Adobe Acrobat Pro. Verify the exact name of your input field (e.g., 'Loan Amount') before applying the script.
Use Custom Calculation JavaScript in the PDF Form
Apply a custom JavaScript condition to the result field to display the correct percentage based on the input field's value.
Adobe Acrobat allows you to use JavaScript to perform complex conditional formatting and calculations that default form tools cannot handle. By utilizing a simple if/else statement, the form can automatically evaluate the inputted loan amount and return the corresponding percentage.
Open your PDF form in Adobe Acrobat Pro and select 'Prepare Form' from the tools menu on the right pane.
Right-click the text field where you want the calculated percentage to appear and select 'Properties' from the context menu.
Navigate to the 'Calculate' tab in the Properties window, select the 'Custom calculation script' radio button, and click the 'Edit' button.
Paste the following script into the editor: `var loanAmount = Number(this.getField("Loan Amount").valueAsString); if (loanAmount <= 1000000) event.value = "80%"; else if (loanAmount <= 1500000) event.value = "75%"; else event.value = "";`. Be sure to adjust "Loan Amount" to match your actual input field name.
Click 'OK', close the Properties window, and enter a test value in the 'Loan Amount' field to verify that the percentage updates correctly.

Edit and Fill Advanced PDF Forms with WPS Office
WPS Office provides powerful PDF editing tools, allowing you to view, fill, and manage interactive PDF forms effortlessly. Whether you are dealing with financial forms, contracts, or invoices, WPS PDF handles standard PDF formats seamlessly.
- 1. Open PDF File: Launch WPS Office and open your interactive PDF form document.
- 2. Access Form Tools: Navigate to the 'Form' tab on the top ribbon to access the interactive form tools.
- 3. Edit Form Fields: Select the appropriate form field tools, such as Text Field or Checkbox, to modify or input your data.
- 4. Save the Document: Once the form fields are configured or filled, click 'Save' to preserve your interactive data.

Frequently Asked Questions
Why is my PDF form calculation not updating automatically?
In Acrobat, go to Edit > Preferences > Forms and ensure that the 'Automatically calculate field values' checkbox is enabled. Without this, calculated fields will not refresh when input values change.
Can I use this JavaScript for loan amounts greater than $1.5 million?
Yes. You can add another `else if` condition in the JavaScript script to define a specific percentage for amounts exceeding $1.5 million before the final `else` statement.
Does the field name in the script need to match the form exactly?
Yes, JavaScript is strictly case-sensitive. The name defined inside `this.getField("Your Field Name")` must perfectly match the actual name of your input field, including spaces and capitalization.




