User Guide

Table Of Contents
ColdFusion XML format 719
The following example shows the xf:bind element of the form shown in the figure in About
XML skinnable forms” on page 709:
<xf:bind id="firstname"
nodeset="//xf:model/xf:instance/cf:data/firstname"
required="true()">
<xf:extension>
<cf:attribute name="type">TEXT</cf:attribute>
<cf:attribute name="onerror">_CF_onError</cf:attribute>
</xf:extension>
</xf:bind>
<xf:bind id="lastname"
nodeset="//xf:model/xf:instance/cf:data/lastname"
required="true()">
<xf:extension>
<cf:attribute name="type">TEXT</cf:attribute>
<cf:attribute name="onerror">_CF_onError</cf:attribute>
</xf:extension>
</xf:bind>
<xf:bind id="email"
nodeset="//xf:model/xf:instance/cf:data/email" required="false()">
<xf:extension>
<cf:attribute name="type">TEXT</cf:attribute>
<cf:attribute name="onerror">_CF_onError</cf:attribute>
</xf:extension>
</xf:bind>
<xf:bind id="satisfaction"
nodeset="//xf:model/xf:instance/cf:data/satisfaction"
required="false()">
<xf:extension>
cf:argument
(in the body of a cf:validate
element)
Data validation specification.
Has one attribute,
name, and body text. Each cf:validate
element can have multiple
cf:argument children, corresponding
to the validation-related CFML tag attribute values, such as
maximum length, and maximum and minimum range values. The
element body contains the CFML attribute value.
Valid
name values are as follows. Unless specified otherwise, the
name is identical to the corresponding CFML tag attribute name.
max
message
min
pattern
cf:trigger
(in the body of a cf:validate
element)
When to do the validation; specifies a form element
validateAt
attribute value.
Has one attribute,
event, which can be one of the following:
onBlur
onSubmit
onServer
If a
validateAt attribute specifies multiple validation triggers, the
XML has one
cf:trigger element for each entry in the list.
Element Description