The label element

Release 2.0 - ...

This element provides a descriptive label for the containing form control. It is much like the (x)html label element, however the xforms:label element should be specified as (first) child element of the containing xforms element. For most XForms UI controls the label control is also required (as first element).

The label specified can exist in instance data (using a Single Node Binding) or as inline text, where when both specifiedĀ a Single Node Binding takes precedence over inline text.

Example

XML CopyCode image Copy Code
<xf:input ref="a:Zip" appearance="minimal" >
 <xf:label>Postal Code:</xf:label>
</xf:input>

Attributes

Name Description
Common Attributes Any attribute from the Common Attributes collection (e.g. id).
Single Node Binding Attributes One or more attributes from the Single Node Binding Attributes group (ref, model, bind).
UI Common Attributes Any attribute from the UI Common Attributes group (appearance, class, navindex, accesskey).
Linking Attributes Any attribute from the Linking Attributes group (e.g. src).

Specification

Link to the XForms specification: the label element.