This content has been marked as final. Show 13 replies
i think you are missing an onClick event in your image button which
should actually submit your form...
right now your form is not being submitted at all...
put <cfdump var="#form#">
at the top of reponce.cfm. Do you see what you expected to see?
This is what I get when I do a cfdump
ADDR1 [empty string]
ADDR2 [empty string]
CITY [empty string]
CNAME [empty string]
OFFICE [empty string]
STATE [empty string]
ZIP [empty string]
The form submits when I have it live with the code for the submit button that is there. Something is wrong in my responce code I think.
in your action page, try <cfif isdefined('form.submit.x') AND
form.submit.x> instead of <cfif isdefined('form.submit')> you have now...
does you client-side validation run properly?
That worked for that part of it. Now when you fill in the proper fields my cfoutput doesn't show what you sent and give the message. I think this is the problem here <cfif strError EQ ""> What would make this work?
My client side validation works on teh contact.cfm page, but not on the form on the responce page if you didn't fill out the proper feilds.
is image an valid type of cfinput?
no it is one I wrote and seemed to work before I wrote the server sided validation code. Is there a better way to use it? or should I go back to a cfinput that is done up with css? Right now it works to the point of my last post. It just doesn't show the message when you fill in the blanks correctly and the form validation for client side doesn't work on the responce page. Works fine on the contact.cfm page.
Good, now is there a way to get the rest of my code to work? It does send email the way it is, but doesn't show the message. Any ideas?
do you mean the strError is not displayed when the form data has errors?
a) debug it: add <cfdump var="#strError#"> right after your validation
b) have you posted all the relevant code from your page? have you
omitted some code that may interfere with the cfif logic?
c) just to rule it out - give your form in responce.cfm page some other
NAME... REQUEST is also a CF scope, so who knows what kind of confusion
may be going on behind the scenes there...
If you mean it is not showing the message on the page, that is because all
of the code is in the <cfmail>
Just add the following after the closing </cfmail> and before the <cfelse>
<p>Thank you for submitting our form.</p>
<p>You submitted the following information:</p>
<cfoutput> <b>Status:</b> <b>Product Request!!</b><br>
<b>Customer First Name:</b> #form.fname#<br>
<b>Customer Last Name:</b> #form.lname#<br>
<b>Customer Email:</b> #form.email#<br>
<b>Customer Address 1:</b> #form.addr1#<br>
<b>Customer Address 2:</b> #form.addr2#<br>
<b>Customer City:</b> #form.city#<br>
<b>Customer State:</b> #form.state#<br>
<b>Customer Zip Code:</b> #form.zip#<br>
<b>Customer Home Phone:</b> #form.phone#<br>
<b>Customer Office Phone:</b> #form.office#<br>
<b>Customer Company Name:</b> #form.cname#<br>
<p>Someone will contact you as soon as possible. </p>
Adobe Community Expert - Dreamweaver
"Irish-Phoenix" <firstname.lastname@example.org> wrote in message
> Good, now is there a way to get the rest of my code to work? It does send
> email the way it is, but doesn't show the message. Any ideas?
i think you got it wrong, ken... all that IS part of the email (what
would be sent otherwise? and empty email?) - the message in question is
the error message in strError var
there is a cfquery on the page, it gived the address and name of business from the DB. Would that interfear?
<cfquery name="contactInfo" datasource="#sitedatasource#" username="#siteUserID#" password="#sitePassword#" maxRows=1>
SELECT companySettings.company AS ViewField1, companySettings.name AS ViewField2, companySettings.address1 AS ViewField3, companySettings.city AS ViewField4, companySettings.state AS ViewField5, companySettings.zip AS ViewField6, companySettings.phone AS ViewField7, companySettings.fax AS ViewField8, companySettings.companyID AS ID_Field
<cflock timeout="2" scope="application" type="READONLY">
and the cfoutput is before the sendmail.