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

Javascript that calculates a percentage

Community Beginner ,
Oct 08, 2018 Oct 08, 2018

Copy link to clipboard

Copied

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

Views

609

Translate

Translate

Report

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;

Votes

Translate

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

Copy link to clipboard

Copied

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;

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

Thank you!

Votes

Translate

Translate

Report

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