XForms Select Element


Allows the user to choose one or more selections from a list of pre-defined items (see the spec). The list of pre-defined items can be specified by either item (see the spec) or itemset (see the spec) elements. You can visually group these pre-defined items by using the choices (see the spec) element to contain them. Note, some representations of the select element do not support visual grouping.


  • UI Common
    • appearance - the value of this attribute gives a hint to the XForms processor as to which type of widget(s) to use to represent this control.
    • accesskey - used to specify the keyboard shortcut for focusing this control.
  • Single-Node Binding
  • Special
    • selection - isn't currently supported. This attribute, when set to 'open', allows the user to provide free entry to the list. Possible values are open and closed, default is closed.
    • incremental - supported, default value is true


  • selection - see corresponding attribute
  • incremental - see corresponding attribute

Type restrictions

The select element can be bound to a node containing simple content capable of holding a sequence. The data binding restriction to simple content may be relaxed when an itemset element is used, which allows the available choices to be obtained from an XForms Model. The relaxation happens when the itemset element specifies the item value using a copy (see spec) element. This is because a copy element can be used to add a subtree of nodes underneath the element that the select control is bound to.


The XForms select element can be represented by the following widgets for the specified appearance attribute values:

  • list - default representation (xhtml/xul)
  • check group- used when appearance = 'full' (xhtml/xul)


Displaying a listbox is the default representation (xhtml/xul).


  • analogous widgets are <html:select size="5" multiple="true"/> and <xul:listbox seltype="multiple"/>
  • visual grouping by choices element isn't implemented
  • if incremental attribute value is false, the bound node is updated when the select control is blurred (i.e. loses focus), otherwise it is updated upon item selection

check group

The select is represented as group of checkboxes (xhtml/xul).


  • appearance attribute contains the value full
  • there are no analogue widgets in XHTML or in XUL
  • visual grouping by choices element is supported
  • if incremental attribute value is false then bound node is updated when item is blurred


    <data xmlns="">

<xf:select ref="/data/values" appearance="full">
    <xf:label>Green colors</xf:label>
      <xf:label>Pale green</xf:label>
    <xf:label>Red colors</xf:label>