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

Javascript that calculates a percentage

Community Beginner ,
Oct 08, 2018 Oct 08, 2018

I am working in a PDF Form and trying to do this calculation.

I understand that I need to do it in javascript, which I have never done. Any help is appreciated.

Total Services Costs x .9 = Total Services Costs 2

TOPICS
Acrobat SDK and JavaScript
759
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

correct answers 1 Correct answer

Community Expert , Oct 09, 2018 Oct 09, 2018

You can use this code as the custom calculation script of the second field:

event.value = Number(this.getField("Total Services Costs").valueAsString) * 0.9;

Translate
Community Expert ,
Oct 09, 2018 Oct 09, 2018

You can use this code as the custom calculation script of the second field:

event.value = Number(this.getField("Total Services Costs").valueAsString) * 0.9;

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 Beginner ,
Oct 09, 2018 Oct 09, 2018
LATEST

Thank you!

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