Radio Buttons Selected Item

Hello Dundas,

I am having a lot of trouble returning the selected items value of a set of radio buttons. Any help is appreciated. Thanks

Ryan

Hi Ryan,

You can use the following script to get the value of the selected item of your radio button:

for(var i = 0; i < radioButtonList1.items.length; i++){
	if (radioButtonList1.items[i].isChecked) {
	  var selectedItem = radioButtonList1.items[i];
	}
}

You can get the text/caption of the selected radio button item by : radioButtonList1.items[i].text;

I hope this helps.

2 Likes