Forms!!!!!

liunx

Guest
I am an absolute beginner when it comes to forms, I have just tried to create one were people give me there info etc and click submit and it comes to me.......well im having trouble<br />
<br />
My form looks somthing like this:<br />
<br />
<form method="POST" action="mailto:[email protected]"><br />
<input type=hidden name="subject" value="Email"><br />
<input type=hidden name="redir" value="index.htm"> <br />
<br />
form in here....<br />
<br />
<br />
</form> <br />
<br />
when I tested it, I filled it out and clicked submit but it just opened outlook with my address in the address bar<br />
<br />
Please help me!<!--content-->What you need is a mail handler like <!-- m --><a class="postlink" href="http://www.freedback.com/">http://www.freedback.com/</a><!-- m --> <br />
Reply if it does not work for you.<!--content-->Here is one:<br />
<HTML><br />
<!-- CREATION DATE: 18-09-2000 --><br />
<HEAD><br />
<TITLE></TITLE><br />
<META NAME="Description" CONTENT=""><br />
<META NAME="Keywords" CONTENT=""><br />
<META NAME="Author" CONTENT="peter vazed"><br />
<META NAME="Generator" CONTENT="AceHTML 4 Freeware"><br />
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><br />
<script language="JavaScript"> <br />
<!-- <br />
var popup="Sorry, rechts klikken is uitgeschakeld.\n\nThis Site Copyright ?000"; <br />
function noway(go) { <br />
if (document.all) { <br />
if (event.button == 2) { <br />
alert(popup); <br />
return false; <br />
} <br />
} <br />
if (document.layers) { <br />
if (go.which == 3) { <br />
alert(popup); <br />
return false; <br />
} <br />
} <br />
} <br />
if (document.layers) { <br />
document.captureEvents(Event.MOUSEDOWN); <br />
} <br />
document.onmousedown=noway; <br />
// --> </script><br />
<!-- form begin --><br />
<SCRIPT><br />
<br />
function validateForm(form) { //This is the name of the function<br />
if (form.naam.value == "") { //This checks to make sure the field is not empty<br />
alert("Naam is niet \n ingevuld."); //Informs user of empty field<br />
form.naam.focus( ); //This focuses the cursor on the empty field<br />
return false; //This prevents the form from being submitted<br />
}<br />
if (form.plaats.value == "") { //This checks to make sure the field is not empty<br />
alert("Plaats is \n niet ingevuld."); //Informs user of empty field<br />
form.plaats.focus( ); //This focuses the cursor on the empty field<br />
return false; //This prevents the form from being submitted<br />
}<br />
if (form.emailadres.value == "") { //This checks to make sure the field is not empty<br />
alert("E mailadres is \n niet ingevuld."); //Informs user of empty field<br />
form.emailadres.focus( ); //This focuses the cursor on the empty field<br />
return false; //This prevents the form from being submitted<br />
}<br />
// you may copy the above 5 lines for each form field you wish to validate<br />
// Replace the text "FIELD1" with the name you wish to call the field<br />
}<br />
</SCRIPT><br />
<!-- form eind --><br />
</HEAD><br />
<BODY bgcolor="#ffdfaa"><br />
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BGCOLOR="#FFDFAA"><br />
<TR><br />
<TD WIDTH=20% align=center><FONT SIZE=7 COLOR="#0f3399">d v z</FONT></TD><br />
<TD WIDTH=70%>&nbsp;<br><FONT SIZE=6 COLOR="#990000">aanvraag formulier sectionaaldeur </FONT> <P><FONT COLOR="#990000">vul hieronder uw gegevens en de tekst in, druk op verzenden <br>en per omgaande wordt uw bericht verstuurd.</FONT><HR WIDTH=95% COLOR="#FFdfaa"></TD><br />
<TD WIDTH=10%><A HREF=http://www.htmlforums.com/archive/index.php/"index.html"><IMG SRC="item5.jpg" BORDER=0 WIDTH=150 HEIGHT=27></A></TD><br />
</TR><br />
<TR><br />
<TD>&nbsp;</TD><br />
<TD><br />
<FORM ACTION="http://www.baboonshop.com/cgi-bin/mail.pl?" METHOD="POST" onSubmit="return validateForm(this)"><br />
<br />
<INPUT TYPE="HIDDEN" NAME="to" VALUE="[email protected]"><br />
<INPUT TYPE="HIDDEN" NAME="nextpage" VALUE="http://rolluik.bizland.com/bedankt.html"><br />
<INPUT TYPE="HIDDEN" NAME="onderwerp" VALUE="aanvraag_secdeur_bizland"><br />
<B>Heer / Dame:</B><BR><br />
<INPUT TYPE="RADIO" NAME="sexe" VALUE="man"> Man<BR><br />
<INPUT TYPE="RADIO" NAME="sexe" VALUE="vrouw"> Vrouw<br />
<BR><br />
<B>Naam:</B> <INPUT TYPE="TEXT" NAME="naam" SIZE=30 MAXLENGTH=40><p><br />
<B>Plaats:</B> <INPUT TYPE="TEXT" NAME="plaats" SIZE=30 MAXLENGTH=40><p><br />
<br />
<B>E-mail:</B> <INPUT TYPE="TEXT" NAME="emailadres" SIZE=30 MAXLENGTH=40><BR><br />
<BR><br />
<!- - Below you'll find the HTML that is the form itself. You may replace the action with either a CGI or your own email address if you do not have access to a CGI script to collect form information. Also, replace the text "FIELD1" with the name you used in the script above.- -><br />
<br />
<br />
<BR><br />
<B>Dit formulier betreft een:</B><BR><br />
<INPUT TYPE="CHECKBOX" NAME="offerte" VALUE="off"> aanvraag offerte<BR><br />
<INPUT TYPE="CHECKBOX" NAME="vraag" VALUE="vraag"> algemene vraag<BR><br />
<INPUT TYPE="CHECKBOX" NAME="speciaal" VALUE="speciale vraag"><br />
speciale vraag<BR><br />
<BR><br />
<br />
<BR><br />
<B>Voer hieronder uw tekst in.<br> Controleer voor verzenden nog even de gegevens.<br>vooral uw email adres</B><BR><br />
<TEXTAREA NAME="opmerkingen" ROWS=5 COLS=45> hier uw tekst...</TEXTAREA><br />
<BR><BR><br />
<br />
<INPUT TYPE="SUBMIT" VALUE="Verzenden"> <br />
<INPUT TYPE="RESET" VALUE="Wissen"><HR WIDTH=95% COLOR="#FFdfaa"><br />
</FORM><br />
&nbsp;</TD><br />
<TD>&nbsp;</TD><br />
</TR><br />
</TABLE><br />
<br />
</BODY><br />
</HTML><br />
==========<br />
This part change in your own:<br />
<INPUT TYPE="HIDDEN" NAME="to" VALUE="[email protected]"><br />
<INPUT TYPE="HIDDEN" NAME="nextpage" VALUE="http://rolluik.bizland.com/thankyou.html"><br />
<INPUT TYPE="HIDDEN" NAME="onderwerp" VALUE="aanvraag_secdeur_bizland"><br />
==========<!--content-->i've got the same problem that ben_washington has...... Whenever I try to submit something on my form my e-mail program opens with the address in it...... Anybody know how to fix that?<!--content-->Ahem... still the new guy here buuut...<br />
<br />
I think the below will make it much simplier. :) <br />
<br />
<FORM METHOD="post" ACTION="mailto:[email protected]" ENCTYPE="text/plain"><br />
<br />
<br />
The encrypt will make it much more readable when it arrives in your mail.<br />
<br />
I would really recommend a form handler though as makes life sooooooooooo much easier.<br />
For an easy FREE form processor I'd suggest <!-- m --><a class="postlink" href="http://www.formany.com">http://www.formany.com</a><!-- m --> Really really flexible!! :)<!--content-->I think what some of you are trying to understand is why your email pops up. The reason is because your "form action" is telling the form to send the information through an email (which is why Outlook opens) You will notice a new email ready to send when it opens which will have the details of the form on it.<br />
<br />
As has been mentioned, it is much better to use some kind of form handling script. There are some good sendmail CGI scripts knocking about, just have a search for them. :)<!--content-->Originally posted by Nebulus64 <br />
i've got the same problem that ben_washington has...... Whenever I try to submit something on my form my e-mail program opens with the address in it...... Anybody know how to fix that? <br />
<br />
Nebulus, the reason you have this problem is because you are using the<br />
<form method="POST" action="mailto:[email protected]"> <br />
<input type=hidden name="subject" value="Email"> <br />
<input type=hidden name="redir" value="index.htm"> <br />
code, or something like this. If you'd like a more proffesional looking form, you should be implementing CGI forms. Dont know how to do this? Just reply.<!--content-->
 
Back
Top