Defines constraints on what data the user can enter into an input form control by binding the input form control to a data type.
Data types can only be associated with xforms:input elements.
Attribute | Description | Type | Default | Options | Use |
---|---|---|---|---|---|
nodeset | The references to the input form control. The value of this attribute must match the value of the ref attribute of the input form control. | xs:NCName | required | ||
required | Indicates whether or not the value is required before the instance data is submitted. | xs:NCName | false() | false(), true() | xs:string |
type | The type of the data item. Refer to the section entitled Specifying data types in the Specifying data types and validation criteria topic for further information. | si:ItemType | mcs:tel, xforms:anyURI, xforms:date, xforms:dateTime, xforms:decimal, xforms:double, xforms:email, xforms:float, forms:string, xforms:time, <custom_type> | required |
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2"
xmlns:si="http://www.volantis.com/xmlns/2006/01/xdime2/si"
xmlns:xforms="http://www.w3.org/2002/xforms">
<head>
<title>xforms:bind</title>
<xforms:model id="contact">
<xforms:instance>
<si:instance>
<si:item name="email"/>
</si:instance>
</xforms:instance>
<xforms:bind nodeset="email" type="xforms:email"/>
</xforms:model>
</head>
<body>
<div>
<xforms:input model="contact" ref="email">
<xforms:label>Email address:</xforms:label>
</xforms:input>
</div>
</body>
</html>