Skip to main content
Participant
October 9, 2018
Answered

Javascript that calculates a percentage

  • October 9, 2018
  • 1 reply
  • 869 views

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

This topic has been closed for replies.
Correct answer try67

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;

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
October 9, 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;

Participant
October 9, 2018

Thank you!