User Guide

Table Of Contents
722 Chapter 30: Creating Skinnable XML Forms
Tag-specific element structure
The following sections describe tag-specific features of the XML for several types of input tags. It
is not all-inclusive. For the specific structure of any ColdFusion form tag, see the XML generated
from the tag by ColdFusion MX.
Selection tags
Tags that are used for selection, cfselect, cfinput type="radio", and cfinput
type="checkbox" are converted to XForms select and select1 elements. These elements
include an
xf:choices element, which in turn has an xf:item element for each item a user can
choose. Each item normally has an
xf:label element and an xf:value element. Check boxes
have a single item; select and radio button controls have more than one.
The following example shows the CFML code for a group of two radio buttons, followed by the
generated XML control elements. This example also shows the use of a
cfformgroup tag to
arrange and label the radio button group.
CFML
<cfformgroup type="horizontal" label="Accept?">
<cfinput type = "Radio" name = "YesNo" value = "Yes" checked>
<cfinput type = "Radio" name = "YesNo" value = "No">
</cfformgroup>
XML
<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>
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.
Part Description