How do I reference a text field in a javascript calculation

New Here ,
Nov 21, 2017

Copy link to clipboard

Copied

How do I reference a text field in a javascript calculation, example: var HR = (55-20); event.value=Math.pow(HR,0.54); Where 55 references a Field name?

TOPICS
Acrobat SDK and JavaScript, Windows

Views

261

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

How do I reference a text field in a javascript calculation

New Here ,
Nov 21, 2017

Copy link to clipboard

Copied

How do I reference a text field in a javascript calculation, example: var HR = (55-20); event.value=Math.pow(HR,0.54); Where 55 references a Field name?

TOPICS
Acrobat SDK and JavaScript, Windows

Views

262

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
Nov 21, 2017 0
Adobe Community Professional ,
Nov 21, 2017

Copy link to clipboard

Copied

the "this.getField()" function is used to acquire a field object. The field object has the value as well as all the other properties of the field.

Here's an article that dicusses some of the details of calculations.  Be sure to check out the sample file

https://acrobatusers.com/tutorials/how-to-do-not-so-simple-form-calculations

Here's a web page with lots of info about performing calculations

Calculating field values and more

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...
Nov 21, 2017 0