Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Multiplying a form field by a specific number.

New Here ,
Jan 08, 2019 Jan 08, 2019

Copy link to clipboard

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!

TOPICS
Acrobat SDK and JavaScript, Windows

Views

2.2K

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
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , Jan 08, 2019 Jan 08, 2019
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

Translate

Translate
Adobe Community Professional ,
Jan 08, 2019 Jan 08, 2019

Copy link to clipboard

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

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
community guidelines
New Here ,
Jan 08, 2019 Jan 08, 2019

Copy link to clipboard

Copied

LATEST

THANK YOU THANK YOU THANK YOU!  I appreciate it so much.

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
community guidelines