Javascript that calculates a percentage

Community Beginner ,
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

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

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;

TOPICS
Acrobat SDK and JavaScript, Macintosh

Views

119

Likes

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

Javascript that calculates a percentage

Community Beginner ,
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

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

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;

TOPICS
Acrobat SDK and JavaScript, Macintosh

Views

120

Likes

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
Oct 08, 2018 0
Most Valuable Participant ,
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;

Likes

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
Reply
Loading...
Oct 09, 2018 1
Community Beginner ,
Oct 09, 2018

Copy link to clipboard

Copied

Thank you!

Likes

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
Reply
Loading...
Oct 09, 2018 1