Radio Button List

Overview

Display a radio button list.

Documentation

This control displays a radio button list.

Example Usage
{[ radiobuttonlist label:'Favorite Color' name:'favorite-color' isrequired:'true' value:'2' columns:'4' ]}
    [[ item value:'1' text:'Red' ]][[ enditem]]
    [[ item value:'2' text:'Green' ]][[ enditem]]
    [[ item value:'3' text:'Blue' ]][[ enditem]]
    [[ item value:'4' text:'Orange' ]][[ enditem]]
    [[ item value:'5' text:'Yellow' ]][[ enditem]]
{[ endradiobuttonlist ]}
Parameters

Below are the parameters for the radio button list shortcode.

  • label - The label to display above the control.
  • showlabel (true) - Whether to display label.
  • name (radiobuttonlist) - The name for the radio button list control.
  • value - The currently selected values.
  • type (rock-check-box-list) - The type of control. This is appended to the root form-group.
  • columns - The number of colums to align the checkboxes to.
  • isrequired (false) - Establishes whether making a selection is necessary.
  • validationmessage (Please select at least one item.) - Message to display when the value is not valid.
  • additionalattributes - Additional attributes to include on the input control.

Examples

Below is an example of the radio button list control in action.

Typical Use
{[ radiobuttonlist label:'Favorite Color' name:'favorite-color' isrequired:'true' value:'2' columns:'4' ]}
    [[ item value:'1' text:'Red' ]][[ enditem]]
    [[ item value:'2' text:'Green' ]][[ enditem]]
    [[ item value:'3' text:'Blue' ]][[ enditem]]
    [[ item value:'4' text:'Orange' ]][[ enditem]]
    [[ item value:'5' text:'Yellow' ]][[ enditem]]
{[ endradiobuttonlist ]}