|
About Flash forms
ColdFusion can deliver forms to the
client in Flash (SWF file) format. ColdFusion automatically generates
the Flash binary from your CFML code and displays it on the client.
Flash forms have the following advantages over HTML forms:
They are browser-independent. Flash Player works in all
commonly used browsers on Windows and Macintosh systems, and in
Netscape and Mozilla on Linux.
By default, they present a modern, visually pleasing appearance,
and you can apply predefined color skins or customize the appearance
with specifications like those specifications in a Cascading Style
Sheet (CSS).
They let you develop complex, multipart forms that do not
require multiple pages, by using tabbed or accordion-style dialog
boxes.
They automatically do much of the layout work for you.
Note: Flash form configuration requirements differ from
ColdFusion requirements. For example, Flash forms do not work sometimes
with all J2EE servers supported by ColdFusion. For more information,
see Installing ColdFusion.
In addition to creating Flash forms, ColdFusion lets you specify
Flash format for cfcalendar, cftree,
and cfgrid tags. Use these tags to embed Flash calendar
choosers, trees, and grids in HTML forms, to eliminate the need
to use Java applets. Information about using Flash grids and trees
in HTML forms is not discussed here. However, the information about
grids and trees also applies to these elements.
A Flash form exampleFlash forms provide many features that help you quickly
create easy-to-use, professional-looking, complex forms. The following
image contains a two-tab form that shows many of these features:
This form includes the following features:
Each tab contains a different section of the overall
form, and users can enter data on both tabs before submitting the
form. This technique can eliminate the need for multiple forms on
multiple HTML pages.
The first and last names are required fields, indicated by
the red asterisks.
The Flash form automatically fills the e-mail field with
data from the name fields, but the user can override this information.
When the user selects the date field, a calendar automatically
opens for picking the date.
Flash form CFML differences from HTML formsBecause ColdFusion sends a Flash form to the client in
SWF file format, everything inside a Flash form is rendered by Flash.
Rendering the form in Flash has several effects:
Plain text and HTML tags in the body of a Flash Form
have no effect.
Specify all form content inside CFML tags that support Flash
forms.
ColdFusion provides two tags that let you take advantage
of Flash features and perform tasks that you would otherwise do
in HTML: 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 tags
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 the CFML Reference describe
the form tags and their features, indicating which attributes and
values work with Flash forms.
|