These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Positive & Negative totals

henryinTO
Registered: Dec 14 2007
Posts: 2

Hi, I have a PDF form that has a number of calculations that end in a total that could be a positive or negative $ amount. I would like to have separate boxes (one for any positive numbers & one for negatives). How do I formate each separate box to automatically accept the appropriate + or - number in its box?
Thanks very much.

My Product Information:
Acrobat Pro 7.0.9, Macintosh
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
If this is an AcroForm, the easiest way to do it is to place identical calculation scripts in both positive and negative text boxes. Then use the Format event to blank out the value in the field that doesn't apply. Take a look at this article:

[url=http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/formatting_text_fields/]http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/formatting_text_fields/[/url]

If it's for a LiveCycle form, then use a hidden 3rd field to do the calculation and assign values to the visible fields based on the result.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script