User Guide
Creating Forms with the cfform Tag 137
cfform controls
The following table describes the controls ColdFusion controls you use in forms
created using
cfform:
Preserving input data with preservedata
The cfform attribute preservedata tells ColdFusion to continue displaying the data
that a user entered in the form after the user submits the form. Data is preserved in
the cftext, cfslider, cftextinput, and cftree controls and in cfselect controls
populated by queries. You can retain data on the form in the following
circumstances:
• The form and action are on a single cfml page.
• The action page has a form that contains controls with the same names as the
corresponding controls on the form page.
For example, if you save this form as preseve.cfm, it continues to display any text that
you enter after you submit it:
<cfform action="preserve.cfm" method="POST" preservedata="Yes">
<p>Please enter your name:
<cfinput type="Text" name="UserName" required="Yes">
<p><input type="Submit" name=""> <input type="RESET">
</cfform>
Control Description
cfgrid
A Java applet-based control that creates a data grid you can
populate from a query or by defining the contents of individual cells.
You can also use grids to insert, update, and delete records from a
data source.
cfslider
A Java applet-based control that defines a slider.
cfinput
Places radio buttons, check boxes, text input boxes, and password
entry boxes in your form (not a Java applet).
cftree and
cftreeitem
Java applet-based controls that define a tree control and individual
tree control items.
cftextinput
A Java applet-based control that defines a text input box.
cfselect
Defines a drop-down list box not a Java applet).
cfapplet
Embed your own Java applets in the form.