Whatever message this page gives is out now! Go check it out!
Prefix | URL | Used for |
html | http://www.w3.org/1999/xhtml | Form tag information, including action, height, width, and name. XHTML compliant. |
xf | http://www.w3.org/2002/xforms | XForms model (including initial field values) and XForms elements that correspond to cfform tags. |
ev | http://www.w3.org/2001/xml-events | System events. Used for the cfinput type="reset". |
cf | All ColdFusion extensions, including passthrough of attributes that do not correspond to XForms elements or attributes. |
1 form tag
2 XForms model element
3 XForms instance element
4 cf:data element
3 XForms submission element
3 XForms bind element
3 XForms bind element
3 .
3 .
3 .
2 (end of model element)
2 XForms or ColdFusion extension control element
2 XForms or ColdFusion extension control element
.
.
.
1 (end of form)<xf:instance>
<cf:data>
<firstname/>
<lastname/>
<email/>
<revision>Comment Form revision 12a</revision>
<satisfaction>very satisfied</satisfaction>
<thoughts>We really want to hear from you!</thoughts>
</cf:data>
</xf:instance><xf:submission action="/_MyStuff/phase1/forms/XForms/FrameExamples/Figure1.cfm"
method="post"/>Attribute | Description |
id | CFML tag name attribute value |
nodeset | XPath expression with the path in the XML to the instance element for the control |
required | CFML tag required attribute value |
Element | Description |
cf:attribute name="type" | Control type. One of the following: CHECKBOX, FILE, IMAGE, PASSWORD, RADIO, SELECT, SUBMIT TEXT, CFSLIDER.The TEXT type is used for cfinput type="text" and cftextinput. |
cf:attribute name="onerror" | JavaScript function specified by the control's onError attribute, if any. |
cfargument name="maxlength" | Value of the control's maxlength attribute, if any. |
cf:validate type="valiadationtype"__ | Data validation information. Has one attribute, type, the validation type, and one or more cf:argument and cf:trigger children. ColdFusion generates a cf:validate element for each of the following:
|
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.
|
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:
|
<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:attribute name="type">SELECT</cf:attribute>
<cf:attribute name="onerror">_CF_onError</cf:attribute>
</xf:extension>
</xf:bind>
<xf:bind id="thoughts"
nodeset="//xf:model/xf:instance/cf:data/thoughts" required="false()">
<xf:extension>
<cf:attribute name="type">TEXT</cf:attribute>
<cf:attribute name="onerror">_CF_onError</cf:attribute>
</xf:extension>
</xf:bind>CFML tag | XML tag |
cfinput type="text" | xf:input |
cfinput type="password" | xf:secret |
cfinput type="hidden" | None: instance data only |
cfinput type="file" | xf:upload |
cfinput type="radio" | xf:select1 |
cfinput type="checkbox" | xf:select |
cfinput type="button" | xf:trigger |
cfinput type="image" | xf:submit |
cfinput type="reset" | xf:submit |
cfinput type="submit" | xf:submit |
cfselect multiple="false" | xf:select1 |
cfselect multiple="true" | xf:select |
cftextarea | xf:textarea |
cfslider | xf:range |
cfgrid | cf:grid |
cftree | cf:tree |
cfformitem type="text" | xf:output |
cfformitem type="html" | xf:output |
cfformitem type="*" (all but text, html) | xf:group appearance="*" |
cfformgroup type="*" | xf:group appearance="*" |
<xf:tagname bind="bindid" id="bindid">
<xf:label>label</xf:label>
<xf:extension>
<cf:attribute name="type">controltype</cf:attribute>
<cf:attribute name="attribname>attribvalue</cf:attribute>
<cf:attribute name="attribname>attribvalue</cf:attribute>
.
.
.
</xf:extension>
</xf:tagname>Part | Description |
tagname | The xf or cf namespace element name, as identified in the table in CFML to XML tag mapping. |
bindid | ID attribute of the model xf:bind element for this control. Specified by the control's CFML tag name attribute. |
label | Control label text. Specified by one of the following:
|
controltype | Type of control. One of the following:
|
attribname | Name of a CFML tag attribute. There is a cf:attribute tag for each attribute specified in the CFML code that does not otherwise have an entry in the XML. |
attribvalue | Value of a CFML tag attribute. |
<cfformgroup type="horizontal" label="Accept?">
<cfinput type = "Radio" name = "YesNo" value = "Yes" checked>
<cfinput type = "Radio" name = "YesNo" value = "No">
</cfformgroup><xf:group appearance="horizontal">
<xf:label>Accept?</xf:label>
<xf:extension/>
<xf:select1 appearance="full" bind="YesNo" id="YesNo">
<xf:extension>
<cf:attribute name="type">radio</cf:attribute>
</xf:extension>
<xf:choices>
<xf:item>
<xf:label>Yes</xf:label>
<xf:value>Yes</xf:value>
<xf:extension>
<cf:attribute name="checked">checked</cf:attribute>
</xf:extension>
</xf:item>
<xf:item>
<xf:label>No</xf:label>
<xf:value>No</xf:value>
<xf:extension/>
</xf:item>
</xf:choices>
</xf:select1>
</xf:group><cf:grid bind="gridname" name="gridname" format="xml" id="gridname>
<metadata>
<cfgridAttribute1>attributeValue</cfgridAttribute1>
...
(There are an entry for attributes with a specified or default value.)
</metadata>
<columns>
<column cfgridcolumnAttribute1="value" ... />
...
</columns>
<rows>
<row>
<column1Name>row1Column1Value</column1Name>
<column2Name>row1Column2Value</column2Name>
...
</row>
<row>
<column1Name>row2Column1Value</column1Name>
<column2Name>row2Column2Value</column2Name>
</row>
...
</rows>
</cf:grid><cfgrid name="mygrid" Format="xml" selectmode="Edit" width="350 ">
<cfgridcolumn name="CorName" header="Course Name" >
<cfgridcolumn name="Course_ID" header="ID">
<cfgridrow data="one0,two0">
<cfgridrow data="one1,two1">
</cfgrid><cf:grid bind="mygrid" format="XML" id="mygrid" name="mygrid">
<metadata>
<autowidth>false</autowidth>
<insert>false</insert>
<delete>false</delete>
<sort>false</sort>
<italic>false</italic>
<bold>false</bold>
<appendkey>true</appendkey>
<highlughthref>true</highlughthref>
<griddatalines>Left</griddatalines>
<gridlines>true</gridlines>
<rowheaders>true</rowheaders>
<rowheaderalign>Left</rowheaderalign>
<rowheaderitalic>false</rowheaderitalic>
<rowheaderbold>false</rowheaderbold>
<colheaders>true</colheaders>
<colheaderalign>Left</colheaderalign>
<colheaderitalic>false</colheaderitalic>
<colheaderbold>false</colheaderbold>
<selectmode>Edit</selectmode>
<notsupported><b> Browser must support Java to view ColdFusion Java
Applets</b></notsupported>
<picturebar>false</picturebar>
<insertbutton>insert</insertbutton>
<deletebutton>delete</deletebutton>
<sortAscendingButton>SortAsc</sortAscendingButton>
<sortDescendingButton>SortDesc</sortDescendingButton>
</metadata>
<columns>
<column bold="false" display="true" header="Course Name"
headerBold="false" headerItalic="false" italic="false"
name="CorName" select="true"/>
<column bold="false" display="true" header="ID"
headerBold="false" headerItalic="false" italic="false"
name="Course_ID" select="true"/>
</columns>
<rows>
<row>
<CorName>one0</CorName>
<Course_ID>two0</Course_ID>
</row>
<row>
<CorName>one1</CorName>
<Course_ID>two1</Course_ID>
</row>
</rows>
</cf:grid>cf:tree format="XML" id="treename>
<metadata>
<cftreeAttribute1>attributeValue</cftreeAttribute1>
...
</metadata>
<node cfml tree item attributes>
<node //nested node with no children
cfml tree item attributes />
...
</node>
...
</cf:tree><cfform name="form2" Format="XML" >
<cftree name="tree1" hscroll="No" vscroll="No" format="xml"
border="No">
<cftreeitem value="Divisions">
<cftreeitem value="Development"
parent="Divisions" img="folder">
</cftree>
</cfform><cf:tree format="xml" id="tree1">
<metadata>
<fontWeight/>
<align/>
<lookAndFeel>windows</lookAndFeel>
<delimiter>\</delimiter>
<completePath>false</completePath>
<border>false</border>
<hScroll>false</hScroll>
<vScroll>false</vScroll>
<appendKey>true</appendKey>
<highlightHref>true</highlightHref>
<italic>false</italic>
<bold>false</bold>
</metadata>
<node display="Divisions" expand="true" href="" img=""
imgOpen="" parent="" path="Divisions" queryAsRoot="true"
value="Divisions">
<node display="Development" expand="true" href=""
img="folder" imgOpen="" parent="Divisions"
path="Divisions\Development" queryAsRoot="true"
value="Development"/>
</node>
</cf:tree><cfformitem name="text1" type="text" style="color:green">
Please tell us a little about yourself and your thoughts.
</cfformitem>
<cfformitem type="hrule" height="3" width="200" testattribute="testvalue" /><xf:output><![CDATA[Please tell us a little about yourself and your
thoughts.]]>
<xf:extension>
<cf:attribute name="style">color:green</cf:attribute>
</xf:extension>
</xf:output>
<xf:group appearance="hrule">
<xf:extension>
<cf:attribute name="width">200</cf:attribute>
<cf:attribute name="height">3</cf:attribute>
<cf:attribute name="testattribute">testvalue</cf:attribute>
</xf:extension>
</xf:group><xf:group appearance="horizontal">
<xf:label>name</xf:label>
<xf:extension/>
<xf:input bind="firstname" id="firstname">
<xf:label>First</xf:label>
<xf:extension>
<cf:attribute name="type">text</cf:attribute>
<cf:attribute name="size">20</cf:attribute>
</xf:extension>
</xf:input>
<xf:input bind="lastname" id="lastname">
<xf:label>Last</xf:label>
<xf:extension>
<cf:attribute name="type">text</cf:attribute>
<cf:attribute name="size">25</cf:attribute>
</xf:extension>
</xf:input>
</xf:group>
<xf:input bind="email" id="email">
<xf:label>Email</xf:label>
<xf:extension>
<cf:attribute name="type">text</cf:attribute>
<cf:attribute name="validation">email</cf:attribute>
</xf:extension>
</xf:input>
<xf:output><![CDATA[<b>We value your input</b>.<br>
<em>Please tell us a little about yourself and your thoughts.</em>]]>
<xf:extension/>
</xf:output>
<xf:group appearance="vertical">
<xf:extension/>
<xf:select1 appearance="minimal" bind="satisfaction" id="satisfaction">
<xf:label>Satisfaction</xf:label>
<xf:extension>
<cf:attribute name="type">select</cf:attribute>
<cf:attribute name="style">width:200</cf:attribute>
</xf:extension>
<xf:choices>
<xf:item>
<xf:label>very satisfied</xf:label>
<xf:value>very satisfied</xf:value>
</xf:item>
<xf:item>
<xf:label>somewhat satisfied</xf:label>
<xf:value>somewhat satisfied</xf:value>
</xf:item>
<xf:item>
<xf:label>somewhat dissatisfied</xf:label>
<xf:value>somewhat dissatisfied</xf:value>
</xf:item>
<xf:item>
<xf:label>very dissatisfied</xf:label>
<xf:value>very dissatisfied</xf:value>
</xf:item>
<xf:item>
<xf:label>no opinion</xf:label>
<xf:value>no opinion</xf:value>
</xf:item>
</xf:choices>
</xf:select1>
<xf:textarea bind="thoughts" id="thoughts">
<xf:label>Additional Comments</xf:label>
<xf:extension>
<cf:attribute name="type">textarea</cf:attribute>
<cf:attribute name="rows">5</cf:attribute>
<cf:attribute name="cols">40</cf:attribute>
</xf:extension>
</xf:textarea>
</xf:group>
<xf:group appearance="horizontal">
<xf:extension/>
<xf:submit id="submit" submission="comments">
<xf:label>Tell Us</xf:label>
<xf:extension>
<cf:attribute name="type">submit</cf:attribute>
<cf:attribute name="name">submit</cf:attribute>
</xf:extension>
</xf:submit>
<xf:submit id="reset">
<xf:label>Clear Fields</xf:label>
<reset ev:event="DOMActivate"/>
<xf:extension>
<cf:attribute name="name">reset</cf:attribute>
</xf:extension>
</xf:submit>
</xf:group>