Adobe COLDFUSION 9 Manual page 792

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
<cfformgroup type="horizontal" label="Name">
<cfinput type="text" name="firstname" label="First" required="yes">
<cfinput type="text" name="lastname" label="Last" required="yes">
</cfformgroup>
The
type corresponds to the HTML
fieldset
and replacing part of the top line with legend text. To specify the legend, use the
dimensions, use the
attribute with
style
The following code shows a simple form group with three text controls. The cfformgroup type="vertical" tag ensures
that the contents of the form is consistently aligned. The cfformgroup type="horizontal" aligns the firstname and
lastname fields horizontally.
<cfform name="comments" format="xml" skin="basiccss" width="400"
preservedata="Yes" >
<cfformgroup type="fieldset" label="Contact Information">
<cfformgroup type="vertical">
<cfformgroup type="horizontal" label="Name">
<cfinput type="text" size="20" name="firstname" required="yes">
<cfinput type="text" size="25" name="lastname" required="yes">
</cfformgroup>
<cfinput type="text" name="email" label="E-mail" validation="email">
</cfformgroup>
</cfformgroup>
</cfform>
Note: Because XML is case-sensitive, but ColdFusion is not, ColdFusion converts
attributes to all-lowercase letters. For example, if you specify
type to
in the XML.
random
Using other skins: If you use any other skin, the supported attributes and attribute values depend on the skin
implementation. Get the information about the supported attributes and attribute values from the skin developer.
Example: CFML for a skinnable XML form
The following CFML code creates the form shown in the image in
how you can use CFML to structure your form.
tag, and groups its children by drawing a box around them
fieldset
and
values.
height
width
cfformgroup type="Random",
"About XML skinnable
Last updated 8/5/2010
attribute. To specify the box
label
and
cfformgroup
cfformitem
ColdFusion converts the
forms" on page 783. It shows
787

Advertisement

Table of Contents
loading

Table of Contents