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

Custom Calculation Script in Acrobat 9.0 Pro

wwilson80
Registered: Oct 22 2009
Posts: 2

I have a fillable PDF form. In the form I have a field named GT, field named Deposit, field named RD, field named AD.

I need a calculation script in field RD which would check to see if field Deposit is greater than field GT if that is true then field RD would = field Deposit - field GT. If field Deposit is less than field GT than field AD would = field GT - field Deposit. Any help would be appreciated.

My Product Information:
Acrobat Pro 9.1.3, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
First, is this an AcroForm or a LiveCycle form?

Next, you need to do is look over the calculation related articles on this site. Go to tutorials and enter "calc" in the search. Here's my favorite

http://www.acrobatusers.com/tutorials/2006/form_calculations

You need a "Conditional Calcuation" You do this with an "if" statement. You'll find examples all over this forum. Do a forum search for "Calc".

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

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