You need to sign in to do that
Don't have an account?
Visualforce refrencing Apex Class - convert radio button to multi select radio button
I have a VF Page that refrences an APEX Class to get a list of picklist values for a survey question. How can I convert the below code so that the fields are now multi select radio button (Multiple choices can be picked) as opposed to a regular radio button
public List<SelectOption> getInterestOptions(){
List<SelectOption> options = new List<SelectOption>();
options.add(new SelectOption('Virtual Phone System','Virtual Phone System'));
options.add(new SelectOption('Online Data Backup','Online Data Backup'));
options.add(new SelectOption('Hosted Email','Hosted Email'));
options.add(new SelectOption('Email Marketing','Email Marketing'));
return options;
Thank you in advance,
V
You can convert the picklist to mutliselect picklist by adding the multiselect= true. This would make the picklist a mutilselect, but i dont know if you can convert it to multiselect radio buttons.
Part of what defines a radio button is that you can only select one from a group of options.
You could possibly display your picklist as a series of checkboxes, by using apex:repeat to loop through an array of options.