Expand my Community achievements bar.

Mutually exclusive checkbox or radiobutton?

Avatar

Former Community Member

Hi,

I have a situation that there are multiple selections/answers for a question and only one selection is permitted (mutually exclusive selection) on the form. I used radiobuttons group to get the user input, which works fine. The issue is once the radiobutton in the group is selected, the group of radiobuttons can not be cleared. I need a mutually exclusive selection control with a function to clear the previous selections.

I am new and I think this issue must have been discussed before but I could not find a solution for it. What in my mind now is either:

1. to use checkbox with javascripts to make a group of checkboxes mutually exclusive selected and still can be unselected. Something like:

if (this.rawValue == "1"){ // CheckBox1
     CheckBox2.rawValue = null;
     CheckBox3.rawValue = null;
}

2. Or to use the radiobutton group, but add a control (button?) to clear all the radiobutton value when clicked, with javascripts.

Is there a better way in getting it done? Your help is greatly appreciated.

Thanks
Sam

0 Replies