Basic tags
- cml:text - Single line text input
- cml:textarea - Multi-line text input
- cml:checkbox - Single checkbox
- cml:checkboxes - Multiple related checkboxes
- cml:radios - Multiple radio buttons
- cml:select - Drop-down menu
- cml:ratings - Multiple radios in a single line
cml:text
Renders a single line text field. Accepts all common attributes.
<cml:text label="Sample text field:" />

Additional attributes
- default
-
If supplied, the value of this attribute will be pre-filled in the text box when the page is loaded. It will not be submitted and will fail the
requiredvalidator until the worker enters text into it.<cml:text label="Sample text field:" default="Enter text here" />
cml:textarea
Renders a multi-line text area. Accepts all common attributes.
<cml:textarea label="Sample text area:" />

Additional attributes
- default
- If supplied, the value of this attribute will be pre-filled in the text area when the page is loaded. It will not be submitted and will fail the
requiredvalidator until the worker enters text into it.
cml:checkbox
Renders a single checkbox. Accepts all common attributes.
<cml:checkbox label="A single checkbox with a default value" />

Additional attributes
- default
- If supplied, the value of this attribute will be submitted if the worker does not check the checkbox. Otherwise, when the worker checks the checkbox, the checkbox’s
valueattribute will be submitted (or, in the absence of thevalueattribute, thelabelattribute.)
cml:checkboxes
Renders a group of checkboxes. Accepts all common attributes.
<cml:checkboxes validates="required" label="Sample checkboxes:">
<cml:checkbox label="Checkbox 1" />
<cml:checkbox label="Checkbox 2" />
<cml:checkbox label="Checkbox 3" />
</cml:checkboxes>

The child <cml:checkbox /> elements accept the following attributes:
- default
-
If this attribute is “true”, the checkbox element will be pre-checked on page-load.
<cml:checkboxes validates="required" label="Sample checkboxes:"> <cml:checkbox label="Checkbox 1" default="true" /> <cml:checkbox label="Checkbox 2" /> <cml:checkbox label="Checkbox 3" /> </cml:checkboxes>
- label
-
The visible label for this checkbox. This is different than the
<cml:checkboxes>element’s “label” attribute, which is the overall field’s label / question. - value
-
The value that gets submitted. If this isn’t present, the value of the “label” attribute is submitted.
cml:radios
Renders a group of radio buttons. Accepts all common attributes.
<cml:radios label="Sample radio buttons:">
<cml:radio label="Radio 1" />
<cml:radio label="Radio 2" />
<cml:radio label="Radio 3" />
</cml:radios>

The child <cml:radio /> elements accept all of the same attributes as the child elements of the cml:checkboxes element.
cml:select
Renders a drop-down menu. Accepts all common attributes.
<cml:select label="Sample select box:">
<cml:option label="Option 1" />
<cml:option label="Option 2" />
<cml:option label="Option 3" />
</cml:select>

The child <cml:option /> elements accept the following attributes:
- label
- The visible label for this option.
- value
- The value that gets submitted if this option is selected. If this isn’t present, the value of the “label” attribute is submitted.
cml:ratings
Renders a set of radio buttons in a single line for performing ratings. Accepts all common attributes.
<cml:ratings label="Rate me" points="4" />

Additional attributes
- points
-
If supplied, the number of ratings to display. (max: 10, default 4)
- from
-
If supplied, the label to display next to the left-most rating.
- to
-
If supplied, the label to display next to the right-most rating.
- cml:rating
-
To customize the values and labels of individual ratings you can specify cml:rating child elements.
<cml:ratings label="Rate me" from="Really Bad" to="Awesome"> <cml:rating label="F" value="0" /> <cml:rating label="C" value="3" /> <cml:rating label="A" value="6" /> </cml:ratings>