User Guide

154 Chapter 2: ColdFusion Tags
style HTML,
Flash,
XML
Opt Styles to apply to the form. In HTML or XML format,
ColdFusion passes the style attribute to the browser
or XML.
In Flash format, must be a style specification in CSS
format. For detailed information on specifying Flash
styles, see Chapter 29, “Creating Forms in
Macromedia Flash” in ColdFusion MX Developer’s
Guide.
preserveData HTML
XML
Opt no When the cfform action attribute posts back to the
page that contains the form, this determines whether
to override the control values with the submitted
values.
false: uses values specified in the control tag
attributes.
true: uses corresponding submitted values.
Applies to these controls:
cfinput, cfslider, cftextinput: overrides the
value attribute value.
cfselect controls that are populated from queries:
Overrides the
selected attribute. See cfselect.
cftree controls: overrides the cftreeitem expand
attribute. If
true, expands previously-selected
elements. The
cftree completePath attribute must
be set to
yes.
cfgrid controls: has no effect. (This avoids
confusion as to whether data has been
resubmitted to the database by the control.)
onLoad HTML
XML
Opt JavaScript to execute when the form loads.
onReset HTML
XML
Opt JavaScript to execute when the user clicks a reset
button.
onSubmit HTML
Flash
XML
Opt JavaScript or ActionScript function to execute to
preprocess data before form is submitted. See
ColdFusion MX Developer’s Guide. If any child tags
specify
onSubmit field validation, ColdFusion does
the validation before executing this JavaScript.
Attribute Applies
to
Req/
Opt
Default Description