User Guide

Table Of Contents
726 Chapter 30: Creating Skinnable XML Forms
<node display="Development" expand="true" href=""
img="folder" imgOpen="" parent="Divisions"
path="Divisions\Development" queryAsRoot="true"
value="Development"/>
</node>
</cf:tree>
The cfformgroup and cfformitem tags
All cfformgroup tags and all cfformitem tags, except type="html" and type="text", generate
xf:group elements. The following rules determine the element structure:
The CFML tag type attribute determines the xf:group appearance attribute.
ColdFusion MX converts type attribute values to all-lowercase characters.
For cfformgroup tags only, the CFML label attribute determines the xf:group label
attribute.
All other CFML attributes are put in cf:attribute elements in a xf:extension element.
The cfformitem tags generate an xf:output element with the body text in a <![CDATA[
section.
The following example shows two
cformitem tags, and the resulting XML:
CFML
<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" />
XML
<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>
Example: control element XML
The following code shows the XML for the input controls for the form shown in the figure in
About XML skinnable forms” on page 709. This code immediately follows the end of the
xf:model element.
<xf:group appearance="horizontal">
<xf:label>name</xf:label>
<xf:extension/>