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

How to add a calculation to a Radio Button

Vega
Registered: Aug 17 2010
Posts: 1

I'm trying to figure out how to add a calculation to two Radio Buttons that I have in a form I've created in livecycle designer. If the person clicks "Yes", I want that the price of the seminar ($100.00) and the membership fee ($25.00) to be totaled in the Total to Pay field. If the person clicks "No", then it should only sum $150.00 in the Total to Pay field.

I really hope the explanation is clear and that somebody could help me with this. I've been doing this for days and still can't figure out what to do.

Thanks!

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
First, the calculation is not added to the Radio button. The radio buttons are used in the calculation script for the target value.
Read this article:
http://acrobatusers.com/tutorials/conditional-execution

A Radio button group has a value for each button in the group. All you need to do is base the conditional in your calculation script on this radio button group value.


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