Kent, I think you need a "<cfelseif>" along with conditional attributes for
your second conditional statement. 

Right now I see

<cfif>
<cfelse>
<cfelse>
</cfif>

I would recommend 

<cfif>
<cfelseif [conditional]>
<cfelse>
</cfif>

> -----Original Message-----
> From: Kent Orso [mailto:[EMAIL PROTECTED]
> Sent: Sunday, June 04, 2006 9:13 AM
> To: CF-Newbie
> Subject: Trying to mail a form
> 
> I'm trying to create a form that emails the results to our contact team as
> well as the user in either text or HTML and I'm getting the following
> error:
> 
> Context validation error for tag CFELSE.
> The tag must be nested inside a CFIF tag.
> 
> 
> Can someone take a look at my code and help me figure out what I'm doing
> wrong?
> 
> <!--- Form Code--->
> <cfif IsDefined("process")>
> 
>      <!--- If the process field has a value of One, then do the following:
>     Send the message to yourself, when the user posts it on your site. ---
> >
> <CFMAIL to="[EMAIL PROTECTED]" from="#Form.Email#" Subject="Join A Foo Form
> Entry" server="mail.foo.com">
> <CFSET todayDate = #Now()#>
>        The information provided below was submitted on
> #DateFormat("#todayDate#", "mmmm dd, yyyy")#
>        by a visitor of contact Page:
> 
>        Name: #Form.FirstName# #Form.LastName#
>        User's IP Address:"#CGI.REMOTE_ADDR#"
>        User's Browser Type:"#CGI.HTTP_USER_AGENT#"
> 
>        Email Address: #Form.Email#
>        Address: #Form.Address#
>        City: #Form.City#
>        State: #Form.State#
>        Zip/Postal Code: #Form.PostalCode#
> 
>        Daytime Number: #Form.DayPhone#
>        Evening Phone: #Form.EveningPhone#
> 
>        Best Time to Contact: #Time#
>        Foo the user is requesting information about: #Case#
> 
>        User's Feedback, Comments, Suggestions:
>        #Form.Comments#
> 
>      ========================================
>     </CFMAIL>
> 
>       <!--- *** If we are sending HMTL-Formatted Email *** --->
> 
> 
>       <!--- Send Email to the User--->
>     <CFMAIL Subject="Form Response"
>       to="""#FirstName# #LastName#"" <#Email#>"
>       from="""Foo LPA"" <[EMAIL PROTECTED]>"
>       type="HTML">
>       <html>
>       <head>
>       <style type="text/css">
>       body {font-family:sans-serif;font-size:12px; color:navy}
>       td {font-size:12px}
>       th {font-size:12px;color:white;
>       background:navy;text-align:left}
>       </style>
>       </head>
>     <body>
> 
>       <h2>Thank you for submitting information to our "Join A Foo"
> form</h2>
>       <p>
>       #form.FirstName#,<br>
>       Thank you for taking the time to fill out our Join A Foo form.<br>
>       Someone from our firm will be contacting you to obtain more
> information <br>
>       regarding the information provided.
>       </p>
>       <p>
>       The Foo Response Team<br>
>       Foo LPA<br>
>       35 Foo Street, Suite 6<br>
>       Foo, MA 43302<br>
>       [EMAIL PROTECTED]
>       </p>
>       </body>
>       </html>
>     </cfmail>
> 
>       <!--- ***If we are NOT sending HTML-formatted Email *** --->
>       <cfelse>
> 
>       <!--- We do not want Coldfusion to suppress whitespace here --->
>       <cfprocessingdirective suppressWhitespace="No">
> 
>       <!--- Send email to the user --->
>       <CFMAIL Subject="Form Response"
>       to="""#FirstName# #LastName#"" <#Email#>"
>       from="""Foo LPA"" <[EMAIL PROTECTED]>"
>       >
> 
>       Thank you for submitting information to our "Join A Foo" form
> 
>       #form.FirstName#,
>       Thank you for taking the time to fill out our Join A Foo form.
>       Someone from our firm will be contacting you to obtain more
> information regarding the information provided.
> 
>       The Case Response Team
>       Foo LPA
>       =======================================
>       </cfmail>
>       </cfprocessingdirective>
> 
>       <!--- Reponse sent back to user after filling out the form --->
>       <h2>Thank you for submitting information to our "Join A Foo"
> form</h2>
> 
> <!--- If "Process" is not defined, let's show the form: --->
>       <CFELSE>
> 
>       <CFFORM format="flash" ACTION="foocontact.cfm" preloader="yes"
> name="contactform" height="500" width="550" preservedata="yes"
> skin="haloorange">
>                       <cfinput type="hidden" name="Process" Value="1">
>                       <cfinput type="text" label="First Name:"
required="Yes"
> Message="Please Enter your First Name" name="FirstName" size="20"
> validateAt="onBlur" maxlength="50">
>                       <cfinput type="text" label="Last Name:"
required="Yes"
> Message="Please Enter your Last Name" name="LastName" size="20"
> validateAt="onBlur" maxlength="50">
>                       <cfinput type="text" label="Email Address:"
name="Email"
> message="Please Enter a Proper Email Address" required="Yes" size="20"
> validateAt="onBlur" maxlength="50">
>                       <cfinput type="text" label="Street Address"
> name="Address" required="Yes" message="You Must Enter a Proper Street
> Address" size="20" validateAt="onBlur" maxlength="50">
>                       <cfinput type="text" label="City:" name="City"
> required="Yes" message="You Must Enter a City of Residence" size="20"
> validateAt="onBlur" maxlength="50">
>                       <cfinput type="text" label="State:" name="State"
> required="Yes" message="You Must Enter a State" size="20"
> validateAt="onBlur" maxlength="50">
>                       <cfinput type="text" label="Zip Code:"
required="Yes"
> validate="zipcode" Message="Please Enter a Properly Formated Zipcode of
> XXXXX or XXXXX-XXXX" mask="99999" NAME="PostalCode" size="10"
> validateAt="onBlur" maxlength="10">
>                       <cfinput type="text" label="Daytime Phone:"
> required="Yes" message="You Must Enter a Daytime Phone" name="DayPhone"
> mask="999-999-9999" size="12" validateAt="onBlur" maxlength="12">
>                       <cfinput type="text" label="Evening Phone"
> name="EveningPhone" required="Yes" message="You Must Enter a Evening
> Phone" mask="999-999-9999" size="12" validateAt="onBlur" maxlength="12">
>                       <cfinput type="text" label="Best Time to Contact:"
> name="Time" required="Yes" message="You Must Enter the best time to
> contact you" size="20" validateAt="onBlur" maxlength="50">
>                       <cfinput type="text" label="Case You Want
Information
> About:" name="Foo" required="Yes" message="You Must Enter the foo you are
> requesting info about" size="20" validateAt="onBlur" maxlength="50">
>                       <cftextarea label="Your Comments:" name="Comments"
> cols="32" rows="10" />
>                       <cfinput type="submit" name="BtnSubmit"
value="Submit
> Estimate Request">
> </cfform>
> 
> </div>
> </body>
> </html>
> 
> </cfif>
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:15:1852
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to