Multiplying a form field by a specific number.

New Here ,
Jan 08, 2019

Copied

How do I multiply a numerical form field by a specific number that is not in a form field?  I have absolutely no experience with Javascript.  Please HELP!

Most Valuable Participant
| Most Valuable Participant

Let's say the first field is called Text1 and you want to multiply its value by 8 and show the result in Text2.

You can do it using this code as the custom calculation script of Text2:

event.value = Number(this.getField("Text1").valueAsString) * 8;

Also, see this tutorial: https://acrobatusers.com/tutorials/how-to-do-not-so-simple-form-calculations

TOPICS
Acrobat SDK and JavaScript, Windows

Views

496

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Multiplying a form field by a specific number.

New Here ,
Jan 08, 2019

Copied

How do I multiply a numerical form field by a specific number that is not in a form field?  I have absolutely no experience with Javascript.  Please HELP!

Most Valuable Participant
| Most Valuable Participant

Let's say the first field is called Text1 and you want to multiply its value by 8 and show the result in Text2.

You can do it using this code as the custom calculation script of Text2:

event.value = Number(this.getField("Text1").valueAsString) * 8;

Also, see this tutorial: https://acrobatusers.com/tutorials/how-to-do-not-so-simple-form-calculations

TOPICS
Acrobat SDK and JavaScript, Windows

Views

497

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jan 08, 2019 0
2 Replies 2
Most Valuable Participant ,
Jan 08, 2019

Copied

Let's say the first field is called Text1 and you want to multiply its value by 8 and show the result in Text2.

You can do it using this code as the custom calculation script of Text2:

event.value = Number(this.getField("Text1").valueAsString) * 8;

Also, see this tutorial: https://acrobatusers.com/tutorials/how-to-do-not-so-simple-form-calculations

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jan 08, 2019 0
LATEST
New Here ,
Jan 08, 2019