Sum Total of Inputs

New Here ,
May 30, 2018

Copy link to clipboard

Copied

Hi,

I'm assuming if this could be done it would be done with a Javascript.

I'm working on a form and am trying to sum the totals entered into four different fields.

Is this possible?

TOPICS
Acrobat SDK and JavaScript, Windows

Views

79

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

Sum Total of Inputs

New Here ,
May 30, 2018

Copy link to clipboard

Copied

Hi,

I'm assuming if this could be done it would be done with a Javascript.

I'm working on a form and am trying to sum the totals entered into four different fields.

Is this possible?

TOPICS
Acrobat SDK and JavaScript, Windows

Views

80

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
May 30, 2018 0
Most Valuable Participant ,
May 30, 2018

Copy link to clipboard

Copied

You don't need JS. Use this option in the Calculate tab and then select the fields you want to add up from the list:

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...
May 30, 2018 0
Adobe Community Professional ,
May 30, 2018

Copy link to clipboard

Copied

Acrobat provides 3 different calculation method and any one of the three is capable of summing four fields.

You can use the "Field is the _______ of the following fields" and select "Sum" and then select the fields to be included in the sum. Just use the mouse to highlight the field name and press the space bar.

You can use "Simplified field notation" and enter the field names separated by the "+" operator if the field names contain no special characters or spaces in their names.

And lastly you use the "Custom JavaScript calculation" to enter all the JavaScript commands to sum and set the field's value. Note the above 2 options also use JavaScript in the background to do their heavy scripting lifting at the loss of some control.

How to do (not so simple) form calculations by Thom Parker. Old but still relevant.

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...
May 30, 2018 0