function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
chris_centrachris_centra 

selectradio with multiple rows and columns?

Hello.  i have a vf page with a question which is answered using radio inputs.  however there are many radio inputs, and i'd like to present them as multiple rows of maybe four radios each (so a single selectradio with twenty selectoption nodes - in a 4x5 grid).  is there no way to make this happen - other than switching to html?  (i'm familiar with the "layout" attribute on the selectradio but that doesn't quite get me there...)
thanks
chris


Ashish_SFDCAshish_SFDC
Hi Chris, 


Use following example

<apex:page >
 
  <apex:form >
      <apex:selectRadio layout="pageDirection">
          <apex:selectOption itemLabel="One" itemValue="1"></apex:selectOption>
          <apex:selectOption itemLabel="Two" itemValue="2"></apex:selectOption>
          <apex:selectOption itemLabel="Three" itemValue="3"></apex:selectOption>
          <apex:selectOption itemLabel="Four" itemValue="4"></apex:selectOption>
      </apex:selectRadio>
  </apex:form>
</apex:page>
And you can use following link for more information

http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_selectRadio.htm


See the below links for similar sample, 

http://www.infallibletechie.com/2012/07/radio-button-selected-by-default-in.html

http://www.infallibletechie.com/2012/07/radio-button-in-salesforce.html


Regards,
Ashish