You need to sign in to do that
Don't have an account?
Priyanka Reddy 74
how to pass selected multiple radio button values to controller
Hi All,
VF:
Apex:
Basically I'm trying to get the selected radio button values to apex controller and store in List and then update account fields using visual force page similar to standard functionality.
Can someone please suggest me how to achieve this functionality usinf vf and apex.
Thank you,
Priyanaka.
VF:
<apex:pageBlock> <table> <apex:repeat value="{!accList2}" var="a" > <tr> <apex:repeat value="{!a}" var="am"> <td> {!am.id} </td> <td> <input type="radio" name="radio1" id="" value="{!am.name}" onclick="test()" /> {!am.name} </td> <td> <input type="radio" name="radio2" id="" value="{!am.phone}" onclick="test()" /> {!am.phone} </td> </apex:repeat> </tr> </apex:repeat> </table> </apex:pageBlock>
Apex:
Public List<String> selectedFieldValues {get;set;} accList2 =[select id,name,phone,billingcity from acount where id IN: idList];
Basically I'm trying to get the selected radio button values to apex controller and store in List and then update account fields using visual force page similar to standard functionality.
Can someone please suggest me how to achieve this functionality usinf vf and apex.
Thank you,
Priyanaka.
https://success.salesforce.com/answers?id=90630000000hU42AAE
https://salesforce.stackexchange.com/questions/49121/how-to-get-the-selected-radiobutton-value-in-apex
A similar query is answered in the above links.
Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks.