The select1 element

Release 2.0 - ...

This form control allows the user to make a single selection from multiple choices.

Example

XML CopyCode image Copy Code
<xforms:select1 ref="/icecream/flavor">
   <xforms:label>Select A Flavor: </xforms:label>
   <xforms:choices>
      <xforms:item>
         <xforms:label>Vanilla</xforms:label>
         <xforms:value>v</xforms:value>
      </xforms:item>
      <xforms:item>
         <xforms:label>Strawberry</xforms:label>
         <xforms:value>s</xforms:value>
      </xforms:item>
      <xforms:item>
         <xforms:label>Chocolate</xforms:label>
         <xforms:value>c</xforms:value>
      </xforms:item>
   </xforms:choices>
</xforms:select1>

Attributes

Name Required / optional Description
selection optional Attribute determining whether free entry is allowed in the list. Legal values are open and closed. Default is closed.
incremental optional When true, this form control will generate additional xforms-value-changed events. The default value is true.
Common Attributes optional Any attribute from the Common Attributes collection (e.g. id).
Single Node Binding Attributes required One or more attributes from the Single Node Binding Attributes group (ref, model, bind).
UI Common Attributes optional Any attribute from the UI Common Attributes group (appearance, class, navindex, accesskey).

Content

Within an select1 element, the following child elements are allowed:

Element Name Required / optional Description
label required Provides a descriptive label for the containing form control
help optional Provides a help message for the containing form control.
hint optional Provides a hint message for the containing form control.
alert optional Provides an alert or error message for the containing form control.
Action element(s) optional Any element from the Action Elements Collection.
Sequence of:
- item
- itemset
- choices
required One or more item, itemset and/or choice elements.

Specification

Link to the XForms specification: the select1 element.