View Full Version : Form Mail Problems
gilbertho
02-20-2003, 12:50 AM
I get form mails, but their empty !!
What am I doing wrong ??
http://www.gilbertho.com/35105.htm
don5408
02-20-2003, 09:36 AM
"What am I doing wrong ??"
Hi. I see a couple of potential problems. What is *probably* the main issue is your positioning of your form tags. Your form should START with <FORM ACTION="/cgi-sys/FormMail.pl" METHOD="POST"> and end with </FORM>. All options and values you place BETWEEN these two tags will be processed.
The way you have your form setup you have all of the values which actually input the user's information and choices positioned BEFORE your form tag (actually you also have a redundant duplicate form tag which should be removed, but that's a separate issue), just move the line <FORM ACTION="/cgi-sys/FormMail.pl" METHOD="POST"> somewhere ABOVE the line which begins with <input name="name" type="text"... (BTW you also have two "Name:" fields) and it should work.
The other thing I noted which may or may not be a problem is that you have value="" in the tags for your text entry fields. While I haven't tested it and I'd tend to *think* that these would be ignored note that these are unnecessary (the values are whatever the user types) and it wouldn't hurt to omit them just in case they're an issue.
If you wish as a test you can try the "fixed" copy of your page which I'm attaching to this post.
Don
gilbertho
02-20-2003, 11:02 AM
THANK YOU THANK YOU THANK you !!!!
Now, just one more question -- how do I get the browser to close after with clicking submit ?? Or to get a little pop up that says thanks for your request??? and the close that thank you screen
don5408
02-20-2003, 12:41 PM
"THANK YOU THANK YOU THANK you !!!!"
You're welcome, welcome, welcome. ;-)
"Now, just one more question -- how do I get the browser to close after with clicking submit ?? Or to get a little pop up that says thanks for your request??? and the close that thank you screen"
Well IMHO the easiest/best way of handling this would be to use a redirect tag to redirect users to a custom "thanks for submitting" page with a link back to either the page with the form, your main index page or any other page you wish to direct the user to next.
1- Upload something along the lines of this simple example page to your public_html folder using the filename "thanks.html"
<HTML>
<HEAD>
<TITLE>Thank you!</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<H2>Thank you for submitting your request!</H2>
<H3>[you will automatically be notified of new releases]</H3>
<H4><A HREF="http://www.gilbertho.com/35105.html">return to GilbertHO.com</a></H4>
</CENTER>
</BODY>
</HTML>
2- Add the following line to your form:
<INPUT TYPE="hidden" NAME="redirect" VALUE="http://www.gilbertho.com/thanks.html">
After a successful submission the user will automatically be forwarded to your thank you page which contains a link back to either the original page or the page you wish to direct them to. If you prefer to save your visitors a click you could opt to add a META REFRESH tag to thanks.html in order to have your thank you page displayed briefly after which the user will be forwarded to your index or other appropriate page automatically. For example the following added to thanks.html would result in the user being returned automatically to 35105.html after your 'thank you for submitting' message has been displayed for 3 seconds:
<META HTTP-EQUIV=REFRESH CONTENT="3; URL=http://www.gilbertho.com/35105.html">
Don
gilbertho
02-20-2003, 02:55 PM
Excellent !!! I dont know if you work for Host Rocket, or if you just do this for the heck of it... but thanks again !!
And if you do work for them you can tell Justin I wont bother him anymore, I will just bother you for advise , Ha Ha !!
gilbertho
02-20-2003, 04:08 PM
Just tried them both , both are not working, no email at all
http://www.gilbertho.com/35105.html
http://www.gilbertho.com/newsletter.html
gilbertho
02-20-2003, 04:50 PM
Ok, heres the story, sometimes works sometime doesnt , why would that be??
don5408
02-20-2003, 05:10 PM
"both are not working, no email at all"
hummm...that I have no explanation for. I uploaded both pages as is to my account changing nothing other than the recipient email addy and both forms worked as designed.
It could just be a delay in the mail delivery so give it a little time to see if the email happens to show up...if it doesn't you'll have to submit a trouble ticket and have HR look into it as the problem would seem to be somewhere other than with your forms.
In testing I did happen to come across a couple of other minor problems though...while I got both of the emailed outputs OK I noticed that a couple of values were absent due to a few small inconsistancies in your sort order tags. The values for order: must match exactly the values in your input fields or that info will be omitted. You may want to update the tags as follows:
35105.html
<INPUT TYPE="hidden" NAME="sort" VALUE="order:realname,userid,email,rate,iam,interested,comments">
"realname" instead of "name", "comments" (with an s) instead of "comment"
newsletter.html
<INPUT TYPE="hidden" NAME="sort" VALUE="order:name,email,userid,address,citystatezip,comments">
"comments" instead of "questions"
As far as using realname vs name be aware that if you use "realname" the sender's name will appear in the From: line of the email.
Best o' luck!
Don
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.