Skip to main content
SSHETH
Participant
June 19, 2020
Answered

Help with creating a Javascript for a field in a PDF form

  • June 19, 2020
  • 1 reply
  • 760 views

I have three fields in a PDF form and I need to calculate one of the fields using the other two fields.  Please see below:

 

Field A is a user input numeric field of format $12345.67

Field B is a user input numeric field of format 12345.678

Field C is a calculated numeric field of format $12345.67

 

I need the following formula as a Javascript for Field C:

C=A*(1-(B/100))  example: $4500*(1-(1.059/100)) go to Field C ($4452)

 

Thank you!

This topic has been closed for replies.
Correct answer try67

Remove the "C=" part. It won't work with it.

1 reply

JR Boulay
Community Expert
Community Expert
June 19, 2020

You don't need JavaScript, just use your formula in the "Simplified Field Notation":

C=A*(1-(B/100))

 

Acrobate du PDF, InDesigner et Photoshopographe
SSHETH
SSHETHAuthor
Participant
June 19, 2020

Awesome!  Thank you very much for the help!