User Guide
cfformgroup 165
</cfformgroup>
</cfform>
The following more complex example shows more fully how you can use cfformgroup tags to
arrange controls in a Flash form. It also shows many of the text formatting features that you can
use in a text
cfformgroup body. When you submit the form, the page dumps the contents of the
Forms scope, to show you the submitted data.
<h2>cfformgroup Example</h2>
<cfif IsDefined("form.oncethrough")>
<h3>The form submitted the following information to ColdFusion MX:</h3>
<cfdump var="#form#"><br><br><br>
</cfif>
<h3>A Flash form using cfformgroup tags</h3>
<cfform name="myform" height="450" width="500" format="Flash">
<!--- The following formgroup shows how you can present formatted text. --->
<cfformitem type="html">
<b><font color="#FF0000" size="+4" face="serif">
This form has two tabs, asking for the following:</font></b><br>
<li>contact information</li>
<li><i>preferences</i></li>
<b>Try entering information on both tabs</b><br>
Submit the form and see what ColdFusion gets in the Forms scope.</b><br>
<a href="http://www.macromedia.com/" target="_blank">
<font color="#0000FF"><u>
This link displays the Macromedia home page in a new browser window
</u></font></a><br>
<br>
</cfformitem>
<!--- Use a tabnavigator with two tabs for user input. --->
<cfformgroup type="tabnavigator" height="220">
<cfformgroup type="page" label="Contact Information">
<!--- Align the first and last name fields horizontally --->
<cfformgroup type="horizontal" label="Your Name">
<cfinput type="text" required="Yes" name="firstName" label="First"
value="" width="100"/>
<cfinput type="text" required="Yes" name="lastName" label="Last"
value="" width="100"/>
</cfformgroup>
<cfformitem type="html"><textformat indent="95"><font size="-2">
Flash fills the email field in automatically.
You can replace any of the text.
</font></textformat>
</cfformitem>
<!--- The bind attribute gets the field contents from the firstname
and lastName fields as they get filled in. --->
<cfinput type="text" name="email" label="email"
bind="{firstName.text}.{lastName.text}@mm.com">
<cfinput type="text" name="phone" validate="telephone" required="Yes"
label="Phone Number">
</cfformgroup>