Adobe COLDFUSION 9 Manual page 1218

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
<!--- Create a structure to hold the contact information. --->
<cfset sContact="#StructNew()#">
<!--- A self-submitting form for the contact information --->
<cfform format="flash" width="550" height="460">
<cfformitem type="html"><b>Name</b></cfformitem>
<cfformgroup type="horizontal" label="">
<cfinput type="text" label="First" name="firstName" width="200">
<cfinput type="text" label="Last" name="lastName" width="200">
</cfformgroup>
<cfformgroup type="VBox">
<cfformitem type="html"><b>Address</b></cfformitem>
<cfinput type="text" label="Company" name="Company" width="435">
<cfinput type="text" label="Street" name="street" width="435">
<cfinput type="text" label="City" name="city" width="200">
<cfselect name="state" label="State" width="100">
<option value="CA">CA</option>
<option value="MA">MA</option>
<option value="WA">WA</option>
</cfselect>
<cfinput type="text" label="Country" name="Country" width="200"
Value="U.S.A.">
<cfformitem type="html"><b>Phone</b></cfformitem>
<cfinput type="text" validate="telephone" label="Business"
name="businessPhone" width="200">
<cfinput type="text" validate="telephone" label="Mobile"
name="cellPhone" width="200">
<cfinput type="text" validate="telephone" label="Fax" name="fax"
width="200">
<cfformitem type="html"><b>Email</b></cfformitem>
<cfinput type="text" validate="email" name="email" width="200">
</cfformgroup>
<cfinput type="Submit" name="submit" value="Submit" >
</cfform>
<!--- If the form was submitted, fill the contact structure from it. --->
<cfif isDefined("Form.Submit")>
<cfscript>
sContact.FirstName=Form.firstName;
sContact.Company=Form.company;
sContact.LastName=Form.lastName;
sContact.BusinessAddress.Street=Form.street;
sContact.BusinessAddress.City=Form.city;
sContact.BusinessAddress.State=Form.state;
Last updated 8/5/2010
1213

Advertisement

Table of Contents
loading

Table of Contents