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:
cfcalendar
, cfgrid
, cfinput
, cfselect
, cftextarea
, and cftree
tags create controls for data display and user input.
cfformitem
tag lets you add formatted or unformatted text, spacers, and horizontal and vertical rules without using HTML.
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.
cfform
tag is the master container, and its contents are child containers and controls.
cfformgroup
tag defines a container that organizes its child elements.
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
.
.
2 cfformgroup type="horizontal" -- Follows the tabnavigator in the form
3 cfinput type="submit" -- Submit button control
3 cfinput type="reset" -- Reset button control
The following sections describe how you use the various Flash form elements to build a Flash form.