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

Drop Down Field Value Needs to Determine Calculation in Total

sprockt012
Registered: Jun 28 2010
Posts: 2

Hello
I am very new to scripting and would like some help with what might be a very easy question. I am using Acrobat Pro 9 with a form and have the following fields:

contribution (text field, formatted as dollar)
payperiod (drop down field, values "12", "24" or "Other")
total_election (text field, formatted as dollar)

I would like the total_election to be the product of contribution x payperiod UNLESS payperiod is "Other". If "Other" is selected, I'd like the user to be able to type in a dollar amount.

Is this something I can do and if so, please help. I thought about maybe making two total fields and having one be hidden if 12 or 24 is selected and then having it show if other is selected. I don't know how to do this, though.

Thanks in advance!

My Product Information:
Acrobat Pro 9.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Condition calculations are a basic part of form scripting so they are definately something you can do. But you'll need to learn a bit about scripting.

Is this a LiveCycle or a Regular PDF form. The scripting models are very different so this is a critical point.

You'll find what you need in this article:
http://www.acrobatusers.com/tutorials/conditional-execution

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