cancel
Showing results for 
Search instead for 
Did you mean: 

RADIOBUTTON LIST UNCHECKED

Former Member
0 Kudos

Hi,

In my interactive form i have radiobuttonlist. I want to uncheck when the input fields are empty. How can i do that. Please let me know if anybody know about this and explain me how to do this.

Thanks,

Senthil Prabhu

Accepted Solutions (0)

Answers (1)

Answers (1)

chintan_virani
Active Contributor
0 Kudos

Senthil,

Yes this is possible. Following line of code should uncheck the radio-button value if you have checked it.

<Your-RadioButtonList-Name>.<Your-RadioButton-Name>.rawValue = null;

Example:-

Lets say you have two inputfields say TextField1 and TextField2, 4 radio buttons say rb1,rb2,rb3,rb4 all grouped within a RadioButtonList called rbList and a Button in your form. As per your requirements lets say when the button is clicked, you want the radio buttons to be unchecked if TextField1 or TextField2 is empty..

Change language to JavaScript and for click event of Button code will look as follows:-

----- form1.#subformSet[0].frm1.Button1::click: - (JavaScript, client) -----------------------------

if(TextField1.rawValue == null || TextField2.rawValue == null)
{
        rbList.rb1.rawValue = null;
	rbList.rb2.rawValue = null;
	rbList.rb3.rawValue = null;
	rbList.rb4.rawValue = null;	

}

Chintan