Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Help with Percentage Calculations in PDF Forms

New Here ,
Nov 25, 2024 Nov 25, 2024

Hi everyone,

I’m working on an interactive PDF form in Adobe Acrobat and need to calculate percentages based on user inputs. For example, I have two fields (e.g., "Total Amount" and "Partial Amount"), and I want a third field to automatically display the percentage calculation (e.g., what percentage the partial amount is of the total).

I’ve been testing the formulas manually using www.percentagescalculator.co.uk, which has been super helpful for verification, but I’m not sure how to script this directly in Acrobat.

Does anyone have experience with setting up scripts for percentage calculations in PDF forms? Any tips or example scripts would be greatly appreciated!

TOPICS
PDF forms
523
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 25, 2024 Nov 25, 2024
LATEST

Format the field at a percentage in the format tab of the field properties, then enter the following custom calculation script:

if(!this.getField("Total Amount").value)

{event.value=""}

else

{event.value=this.getField("Partial Amount").value/this.getField("Total Amount").value}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines