Thanks for the lead. I tried looking this subject up yesterday with a search on this site but missed that one.
I had figured it out late yesterday and used the code in a calculate event but since looking at the topic you linked me to it seems better to use the change event.
I also needed to have the sub form hidden when the document is opened unless a particular radio button is selected. I put this in the initialize event and it seems to work great.
If you're still watching this one there is something else I can't figure out why it's not working.
I tried putting a button with an alert script that would get the value of a radio button list. So I put the following code in the click event of a button that resides in the same sub form as the radio button list.
var myVal = xfa.form.form1.MainPage.SecondSF.RadioButtonList.rawValue;
If no buttons are selected the the value us "" and if button 1 is selected then the value is "1" and so forth.
Well when I try to get the value of a radio button list in another subForm then it doesn't work.
var myVal = xfa.form.form1.MainPage.FirstSF.RadioButtonList.rawValue;
I'm not understanding what I'm doing wrong. Can you tell by the sample code what I need to do?
Here is the exact code that I've finally ended up with that is not working.
var myRadioBtn = xfa.form.form1.MainPage.RadioButtonSF.RadioButtonList.rawValue;
The button that this is attached to is in another subForm called FirstSF. The alert comes up but with nothing in it. The radio RadioButtonList consists of a Yes and No button and the Yes button is selected.