OPTION - AppDaddy-Software-Solutions-Inc/framework-markup-language GitHub Wiki

<OPTION/> : <ROW/>

The <OPTION/> widget is used by the <CHECKBOX/>, <RADIO/>, <SELECT/> and <TYPEAHEAD/> widgets to specify selectable options.

Create an <OPTION/> for each distinct value you wish to represent. An <OPTION/> can also specify a simple text label to display in place of its value. If label is omitted, value is used in its place. Alternatively, the option's label can be composed of child widgets by placing them inside of the <OPTION/> tag as show in example #2 below.

When used as part of a <TYPEAHEAD/>, the option can contain one ore more <TAG/> widget's.

Attributes

Name Type Default Description Req
type string empty, nomatch, nodata, prototype
value string The value of the option when selected. If ommitted, label is used in its place.
label string The text value to display. If ommitted, value is used in its place. Labels can also be made up of other widgets (*example #2).
selected boolean false Selects the option by default. Not this only applies to the <CHECKBOX/>

Examples

Example #1 : a checkbox with 4 options
    <CHECKBOX id="checkboxinput" size="65">
        <OPTION value="a" label="A" selected="true"/>
        <OPTION value="b" label="B"/>
        <OPTION value="c" label="C" selected="true"/>
        <OPTION value="d" label="D"/>
    </CHECKBOX>

logo See it in Action

Example #2 : a checkbox with decorated options
<CHECKBOX id="monthcheckbox" data="MONTHS">
   <OPTION value="{data.month}" >
      <ICON icon="calendar_month"/>        
      <TEXT value="{data.month}"/>            
   </OPTION>  
</CHECKBOX>

logo See it in Action

Other Widgets You May Find Useful:

⚠️ **GitHub.com Fallback** ⚠️