Follow

cml:select - Drop-down Menu

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>

Note: You can allow contributors to submit more than one answer by using the attribute multiple="true".

 

The <cml:option /> children elements accept the following attributes:

label

The visible label for this option. This is different than the parent <cml:select> element's label attribute, which is the label for the entire drop-down menu.

 
 
 
 
value

The value that gets submitted if the contributor selects the corresponding option. If this isn't present, the value of the label attribute is submitted.

selected='true'

The default selected option. If no changes are made to the select drop-down then that option will be used as the answer. Example below:

<cml:select label="Sample select box:"> 
  <cml:option label="Yes" selected='true' /> 
  <cml:option label="No" /> 
  <cml:option label="Maybe" /> 
</cml:select>

In the example above Yes is the default answer and will show as preselected in the job Preview.

review-data (optional)

Add a column for review-data in the uploaded dataset to reference in the cml for that element.

The column contents should match the value attribute.

Add review-data="{{DATASET_COLUMN}}" and task-type="qa" in the cml snippet.


Was this article helpful?
7 out of 10 found this helpful


Have more questions? Submit a request
Powered by Zendesk