Checkbox List

Overview

Displays a checkbox list.

Documentation

This control displays a checkbox list.

Example Usage
{[ checkboxlist label:'Favorite Colors' name:'favorite-colors' 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]]
{[ endcheckboxlist ]}
Parameters

Below are the parameters for the checkbox list shortcode.

  • label - The label to display above the control.
  • showlabel (true) - Whether to display label.
  • name (checkbox) - The name for the Checkbox list picker control.
  • value - The currently selected values.
  • controltype (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 a value.) - Message to display when the value is not valid.
  • additionalattributes - Additional attributes that you want to add to the input controls (not each checkbox control will get these attributes).

Examples

Below is an example of the checkbox list control in action.

Typical Use
{[ checkboxlist label:'Favorite Colors' name:'favorite-colors' isrequired:'true' value:'2,4' columns:'2' ]}
        [[ 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]]
{[ endcheckboxlist ]}