
794
DEVELOPING
COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
Las
t
upda
te
d 8/5/2010
Tag-specific element structure
The information described here about the tag-specific features of the XML for several types of input tags is not all-
inclusive. For the specific structure of any ColdFusion form tag, see the XML generated from the tag by ColdFusion.
Selection tags
Tags that are used for selection,
cfselect
,
cfinputtype="radio"
, and
cfinputtype="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>
Part
Description
tagname
The xf or cf namespace element name, as identified in the table in “
CFML to XML tag mapping
” on page
792.
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:
•
The CFML tag
label
attribute
•
The
value
attribute of the
radiobutton
,
radio
,
submit
, and
resetcfinput
tags
•
The tag body content of
cfselectoption
subtags,
•
Not used for
cfgrid
and
cftree
tags.
controltype
Type of control. One of the following:
•
The
cfinputtype
attribute
•
Select
,
slider
, or
textarea
, for the
cfselect
,
cfslider
, or
cftextarea
tags, respectively.
•
Not used for
cfgrid
and
cftree
tags.
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.