
704
DEVELOPING
COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
Las
t
upda
te
d 8/5/2010
elements as Flash items in an otherwise-HTML form. For more information on Flash forms and form elements, see
“
Creating Forms in Flash
” on page 765.
XML Skinable forms
ColdFusion can generate XML forms and apply XSLT skins to format the forms. XML format
forms let you separate the form presentation from the form logic and data field information. They give you detailed
control over the appearance of the forms by applying custom skins, and let you create custom controls. For more
information on XML skinnable forms, see “
Creating Skinnable XML Forms
” on page 783.
Direct support for ColdFusion variables
You can easily use ColdFusion variables directly to populate your form
controls. For example, you can specify a query result to populate the
cfgrid
and
cftree
tags.
These features make CFML forms tags powerful and flexible, and let you easily develop fully featured, pleasing forms.
The CFML tags used here, do not describe or use most of their special features. See“
Building Dynamic Forms with
cfform Tags
” on page 722 for information on how to use many of the tags that are specific to ColdFusion, such as
cftree
and
cfgrid
.
Creating a basic form
The following simple form shows how you can create a form that lets a user enter data. This form uses basic CFML
form tags. It does not use any of the advanced features of ColdFusion, such as validation, Flash or XML format, or
special input controls. You could convert it to a purely HTML form by removing the initial “cf” prefix from the tag
names, and the form would work.
The following table shows the format of form control tags:
Control
Code
Text control
<cfinput type="Text" name="ControlName" size="Value" maxlength="Value">
List (select) box
<cfselect name="ControlName">
<option value="Value1">DisplayName1
<option value="Value2">DisplayName2
<option value="Value3">DisplayName3
</cfselect>
Radio buttons
<cfinput type="Radio" name="ControlName" value="Value1">DisplayName1
<cfinput type="Radio" name="ControlName" value="Value2">DisplayName2
<cfinput type="Radio" name="ControlName" value="Value3">DisplayName3
Содержание COLDFUSION 9
Страница 1: ...Developing Applications ADOBE COLDFUSION 9...