Login

Login

Basic tags


cml:text

Renders a single line text field. Accepts all common attributes.

<cml:text label="Sample text field:" />

Sample cml:text

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 required validator until the worker enters text into it.

<cml:text label="Sample text field:" default="Enter text here" />

Sample cml:text


cml:textarea

Renders a multi-line text area. Accepts all common attributes.

<cml:textarea label="Sample text area:" />

Sample cml:textarea

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 required validator 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" />

Sample cml:checkbox

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 value attribute will be submitted (or, in the absence of the value attribute, the label attribute.)

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>

Sample 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>

Sample cml:checkboxes with default attribute

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>

Sample 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>

Sample 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" />

Sample basic cml:ratings

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>

Sample basic cml:ratings


Products

read more...

Customers

read more...

Social Media



Law Talk

Privacy Policy Terms of Service ©2011 CrowdFlower