The input element

Release 2.0 - ...

This form control enables free-form data entry or a user interface component appropriate to the datatype of the bound node.
For example, when the bound node is of type boolean, a checkbox might be rendered, or when the bound node is of type date, a calendar control might be rendered.

For other datatypes, it is usually rendered as an (x)html input element.

Example

XML CopyCode image Copy Code
<xf:input ref="a:Zip" appearance="minimal" >
 <xf:label>Postal Code:</xf:label>
 <xf:hint>Enter your zip code</xf:hint>
 <xf:alert>The zip code must be in the format 1234 AB.</xf:alert>
</xf:input>

Attributes

Name Required / optional Description
incremental optional When true, this form control will generate additional xforms-value-changed events. The default value is false.
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 input 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.

Specification

Link to the XForms specification: the input element.