You need to sign in to do that
Don't have an account?
atall
I'm able to select all the radio buttons in a VF Page
Hi I've created 3 Radio Buttons using Visual Force in Developer Edition, but the problem is I'm able to select all the 3 radio buttons at a time whereas my requirement is that I've to select only one and must be able to deselect the other 2 radio buttons Please help me in this regard and let me know if you have any questions.
Hi atal
Radiobuttom means you can select one at a time.No multiselection is possible in radiobuttom.If you are able to select multiple at a time then please share your code...
Here I have posted a code please refer this.In my code I have designed radio buttom for MALE and FEMALE.....
<apex:page controller = "mycontroller">
.........................................................................
...........................................................................
<apex:outputLabel value="Gender" for="gender">
<apex:selectRadio value="{!gender}">
<apex:selectOptions value="{!options}" id="gender"/>
</apex:selectRadio>
</apex:outputLabel>
</apex:page>
NOw my controller is.....
public class mycontroller {
public List<SelectOption> options {get;set;}
public mycontroller() {
options = new List<SelectOption>();
options.add(new SelectOption('Male','Male'));
options.add(new SelectOption('Female','Female'));
}
}
Try this...
please let me know If there is any problem....otherwise please mark it solved for future reference...
Thanks
asish
asish is right you can not select more than one at a time using radio button... You probably used select check box...