User Guide

Table Of Contents
Building Flash forms 689
ColdFusion provides two tags that let you take advantage of Flash features and perform tasks
that you would otherwise do in HTML: you use the
cfformitem tag to add text blocks and
horizontal and vertical rules to your form, and you use the
cfformgroup tag to structure your
form.
Standard ColdFusion forms tags, such as cfinput and cftree, include attributes that work
only with Flash forms, and attribute values that let you specify form style and behavior. These
include the
skin attribute with many Flash-specific style attribute values for appearance, and
the
bind attribute for filling a field value with data from other fields.
The reference pages for the individual tags in CFML Reference describe the form tags and their
features, indicating which attributes and values work with Flash forms. This chapter describes
how you can use CFML tags to build effective Flash forms.
Building Flash forms
You build Flash forms using standard ColdFusion form tags, plus the cfformgroup and
cfformitem tags. These tags create the elements of the form, as follows:
The cfcalendar, cfgrid, cfinput, cfselect, cftextarea, and cftree tags create controls
for data display and user input.
The cfformitem tag lets you add formatted or unformatted text, spacers, and horizontal and
vertical rules without using HTML.
The cfformgroup tag creates containers, such as horizontally aligned boxes or tabbed
navigators, that let you group, organize, and structure the form contents.
Flash forms follow a hierarchical structure of containers and children.
1.
The cfform tag is the master container, and its contents are child containers and controls.
2.
The cfformgroup tag defines a container that organizes its child elements.
3.
All other tags create individual controls, including display elements such as rules.
For example, the figure in the About Flash forms section has the following hierarchical structure
of containers and children. (This outline only shows the structure of the page that is visible in the
figure. It omits the structure of the Preferences tab.)
1 cfform
2 cfformgroup type="tabnavigator" -- Tab navigator container
3 cfformgroup type="page" -- Tabbed page container, child of tabnavigator
4 cfformgroup type="horizontal" -- Aligns its two children horizontally
5 cfinput type="text" -- First name input control
5 cfinput type="spacer" -- Space between the name input controls
5 cfinput type="text" -- Last name input control
4 cfformitem type="hrule" -- Displays a rule
4 cfformitem type="html" -- Displays formatted text
4 cffinput type="text" -- E-mail input control
4 cfformitem type="hrule" -- Displays a rule
4 cfinput type="text" -- Phone number input control
4 cfinput type="spacer" -- Space between the phone and date controls
4 cfinput type="datefield" -- Date input control
3 cfinput type="page" -- Second tabbed page container for preferences
.