XForms Attribute
- Previous Page XForms Data Type
- Next Page XForms Behavior
XForms attributes can define data constraints, types, and behaviors.
XForms Attribute
XForms uses attributes to define constraints (or other attributes) that can affect the behavior of XForms controls.
Example:
required="true()" The attribute does not allow specified instance data to be submitted as a null value.
type="decimal" Attributes are allowed to submit decimal values only.
calculate Attributes can calculate a value from instance data.
See the attribute reference below this page.
Binding attributes to data
XForms can use the <bind> element to bind XForms attributes to XForms data:
<model> <instance> <person> <fname/> <lname/> </person> </instance> <bind nodeset="person/lname" required="true()"/> </model>
In the above example, the attribute nodeset="person/lname" can bind the attribute required="true()" to the instance data element <lname>.
XForms Attribute Reference
Name | Description |
---|---|
calculate | Define calculations to be performed on the item. |
constraint | Define constraints on the item. |
p3ptype | Define P3P data type for the item. |
readonly | Define an edit restriction (readonly) for the item. |
relevant | Define how data items are related. (For display or submission) |
required | Defining data items is a required item. (Cannot be empty) |
type | Define data types for the project. |
- Previous Page XForms Data Type
- Next Page XForms Behavior