Skip to main content
Participant
September 17, 2018
Answered

Calculation in PDF Fillable Form

  • September 17, 2018
  • 1 reply
  • 724 views

Cannot figure out how get the calculation for:

80% up to $1 million, 75% for loan amounts > $1 million > $1.5 million

This topic has been closed for replies.
Correct answer try67

OK, then you can use this code the for field where you want to show the result:

var loanAmount = Number(this.getField("Loan Amount").valueAsString);

if (loanAmount<=1000000) event.value = "80%";

else event.value = "75%";

Edit: fixed a typo in the code...

1 reply

try67
Community Expert
Community Expert
September 17, 2018

You description is not very clear... So it's 80% from 0 to 1 million, $75 from 1 million to 1.5 million? What if it's more than 1.5 million?

Participant
September 17, 2018

If greater than $1.5 it wouldn't be allowed, so not taking it into

consideration.

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
September 17, 2018

OK, then you can use this code the for field where you want to show the result:

var loanAmount = Number(this.getField("Loan Amount").valueAsString);

if (loanAmount<=1000000) event.value = "80%";

else event.value = "75%";

Edit: fixed a typo in the code...