Hello - thanks for hopefully attempting to answer my question.
I'm trying to set up formatting/auto functions in fields in forms using Adobe Acrobat calculations. What I am wanting to do is have around 4 - 5 fields in a form which all add up. Pretty simple so far (ie go to properties in the form and add etc).
However I'm wanting the fields that I enter a number into and then the final "calculator field" in the form to be formatted with an automatic "+" or "-" depending on what is entered.
Two examples both using 4 fields that I enter data into in the form and one "calculator field:
EXAMPLE 1:
What I enter: Field 1; "4", Field 2; "10", Field 3; "-5", Field 4; "25", Final "Calculator field"; "34"
What I would like to see in Example 1: Field 1; "+4", Field 2; "+10", Field 3; "-5", Field 4; "+25", Final "Calculator field"; "+34"
EXAMPLE 2What I enter: Field 1; "10", Field 2; "-25", Field 3; "0", Field 4; "-5", Final "Calculator field"; "-20"
What I would like to see in Example 1: Field 1; "+10", Field 2; "-25", Field 3; "-", Field 4; "-5"; Final "Calculator field"; "-20"
In other words I am seeking that a positive number have a "+" in front of it, a negative number have a "-" in front of it and zero result have a "-"/dash in the field.
My understanding is that the script would need to be entered into the "Custom Calculate script" box in the Properties of the "calculator field". Am I correct? And I understand that that should be in Javascript correct?
If so, what is the script I need to achieve what I am after?
Thanks very much and look forward to hearing back with any ideas anyone would care to share.
Kind regards
Chris