Expand my Community achievements bar.

Setting radio buttons from a drop down list

Avatar

Level 1

Hi,

I'm creating a form that is using drop down selections (drop down menu's) and radio buttons. I want to set a radio button automatically from a drop down menu selection. I've used the following code with no success. Thanks for any assistance.

switch

(xfa.event.change) {

case

"G599533":

MyRadio1[0].value

= "Yes";

break

;

case

"H337864":

MyRadio1[0].value

= "No";

break

;

}

Peter

4 Replies

Avatar

Former Community Member

Typically the RadioButtons belong to a RadioButtonList Group. You woudl set the value of the RadioButton through the RadioButtonList object. So when you are ready to set the object you woudl use RadioButtonList.rawValue = "Yes"

Note that in your example you are using the value property and you shoudl be using the rawValue property to set the RadioButton.

Paul

Avatar

Level 1

Thanks, I tried the rawValue = "Yes", but in testing it using the adobe pro, it displays "RadioButtonList1 is not defined" in the debugging window. I believe I've defined the radio button in the binding window, but is there another area that I have to define it in? Sorry, new to scripting. Do I have to define it in the actual script or just point to the radio button (this is what I've been attemptin, with no success).

Thanks

Avatar

Former Community Member

It woudl be easier to see the form ..send it to LiveCycle8@gmail.com and I will have a look.

Paul

Avatar

Level 1

Thanks.

Peter R. Salazar

Sr. Tech. Support Eng.

System Sell-Off Department / FMS Engineering

Raytheon IDS-MCVC

P.O. Box B

WSMR, NM 88002

575-678-9885 office

575-442-0740 Mobile

575-678-9793 fax

Peter_Salazar@Raytheon.com

From:

pguerett <forums@adobe.com>

To:

Peter Salazar <peter_salazar@raytheon.com>

Date:

08/09/2010 01:26 PM

Subject:

Re: Setting radio buttons from a drop down list

It woudl be easier to see the form ..send it to

Lmailto:LiveCyle8@gmail.com and I will have a look.

Paul