I am a new to creating PDF forms and I am workinn on this form for a non-profit organization I do some work with. Here is my problem. The form is created except I have set up a radio button so that users can check to tell me wether they are a 'youth' or 'adult' depending on what they pick I have acrobat make a hidden field visable and it will show the price. Depending on if they pick youth or adult the prce is the defauly value so it naturally becomes visable. I also have field that is supposed to calculate the total cost of the what they are supposed to write the chack with. When I set up the calculation field wit hthe sum it calculates the price of both youth and adult wether they are hidden of visable and I want the calculation price based only visable fields. Can someone help me with the code for this?
thanks
var price = this.getField("age").value=="youth" ? 20 : 30;
event.value = price * this.getField("sum").value;
(I'm assuming here that the radio group is called "age", the sum field is called "sum" and that the prices are fixed. If they prices come from a field, replace the hard-coded numbers with getField("").value statements)
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com