HTML - How To Validate Form Fields And Captcha?
The contactus page currently sends data to 3 email addresses.
I dont verify these fields currently but wish to do so. I merely have them sent to feedback.php which accepts the data and sends the emails. I want two things done where I need help: 1, I need all fields to be validated in the contactus page itself before going to the feedback.php file 2, I want a simple captcha that can also be verified on contactus.php itself. Can someone help? Thanks Navs We currently have a feedback form (feedback.php) that is used in our contactus page. This gets sent to three email address. I now want to add a captcha to it and create a verification for all the fields in the contactus page itself Similar TutorialsI am having a problem adding captcha to this form. I am looking at tutorials but are even more confused by them please help.
HTML Code: <head> <link rel=stylesheet href="stylesheet2004.css" type="text/css"> <script language="javascript" src="hide.js" type="text/javascript"></script> <script type="text/javascript"> <!-- function MM_validateForm() { //v4.0 if (document.getElementById){ var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments; for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]); if (val) { nm=val.name; if ((val=val.value)!="") { if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@'); if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n'; } else if (test!='R') { num = parseFloat(val); if (isNaN(val)) errors+='- '+nm+' must contain a number.\n'; if (test.indexOf('inRange') != -1) { p=test.indexOf(':'); min=test.substring(8,p); max=test.substring(p+1); if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n'; } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; } } if (errors) alert('The following error(s) occurred:\n'+errors); document.MM_returnValue = (errors == ''); } } <script language="JavaScript"> // Code for validating the form // Visit http://www.javascript-coder.com/html-form/javascript-form-validation.phtml // for details var frmvalidator = new Validator("contact_form"); //remove the following two lines if you like error message box popups frmvalidator.EnableOnPageErrorDisplaySingleBox(); frmvalidator.EnableMsgsTogether(); frmvalidator.addValidation("name","req","Please provide your name"); frmvalidator.addValidation("email","req","Please provide your email"); frmvalidator.addValidation("email","email","Please enter a valid email address"); </script> <script language='JavaScript' type='text/javascript'> function refreshCaptcha() { var img = document.images['captchaimg']; img.src = img.src.substring(0,img.src.lastIndexOf("?"))+"?rand="+Math.random()*1000; } </script> //--> </script> <script language="javascript" src="emailvalidation.js" type="text/javascript"></script> </head> <body> width="386" height="65" border="0"></div></nobr> <table border="0" width="770" cellspacing="0" cellpadding="0" align="center"> </tr> </table> <table border="0" width="770" cellspacing="0" cellpadding="0" align="center"> <tr> <td id="navigation" valign="top" width="155"> <!-- navigation--> <script language="javascript" src="navigation.js" type="text/javascript"></script> <noscript> <div class="nav"><a href="/instruments/index.html">Products</a></div> <div class="nav"><a href="/applications/index.html">Applications Gallery</a></div> <div class="nav"><a href="/downloads.html">Product Literature</a></div> <div class="nav"><a href="/order.html">How to Order</a></div> <div class="nav"><a href="/about.html">About Mark-10</a></div> <div class="nav"><a href="/contact.html">Contact Us</a></div> <div class="nav"><a href="/faq.html">Frequent Questions</a></div> <div class="nav"><a href="/distributor.html">Distributors</a></div> <div class="nav"><a href="/tools/angle.html">Conversion Calculators</a></div> <div class="nav"><a href="/list.html">Join Mailing List</a></div> <div class="nav"><a href="/index.html">Home</a></div></noscript> <!-- end navigation--> </td> <td id="spacer" class="divid"><img src="images/spacer.gif" alt="" width="11" height="1" border="0"></td> <td id="content_table"> <h1>INQUIRIES</h1> <p>Thank you for taking an interest in Mark-10 force and torque measurement products. If you have any specific questions or an application for which you would like us to recommend a solution, please complete the appropriate fields below. If you wish to receive our latest catalog and/or be added to our mailing list, please check the appropriate boxes below.</p> <p> </p> <FORM id="frmCaptcha" NAME="frmCaptcha" METHOD="POST" action="http://www.mark-10.com/cgi-bin/mailto" style="padding:0px; margin:0px;"> <INPUT TYPE="hidden" NAME="RECIPIENT" VALUE="info@mark-10.com"> <INPUT TYPE="hidden" NAME="subject" VALUE="Mark-10 Web Submit Form"> <INPUT TYPE="hidden" NAME="THANKURL" VALUE="http://www.mark-10.com/thankyou-inquiry.html"> <input type="hidden" name="identicalfields" value="Email,Emailconfirm"> <table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="600" height="493"> <tr> <tr> <td width="131" height="22" colspan="2" align="right">*Name:</td> <td height="22" colspan="2" onfocus=><input type="text" name="Name" id="Name"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right"><font size="2">Title:</font></td> <td colspan="2" height="22"><input name="Title" type="text" size="41"></td> </tr> <tr> <p style="width:300px; text-align:right;"> <td colspan="2" style="text-align: right"> *Email:</td> <td height="22" colspan="2" align="left"><input type="text" name="Email" id="Email"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right">*Confirm Email: </td> <td height="22" colspan="2" align="left"><input type="text" name="Emailconfirm" size="22" id="Emailconfirm"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right"><font size="2">Company: </font></td> <td colspan="2" height="22"><input name="Company" type="text" size="41"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right"><p align="left" style="text-align: right; margin-top: 0; margin-bottom: 0"> Industry:</td> <td colspan="2" height="22"><input name="Industry" type="text" size="41"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right"><font size="2">*Address:</font></td> <td colspan="2" height="22"><input name="Address1" type="text" id="Address1" size="53"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right">*<font size="2">City:</font></td> <td colspan="2" height="22"><input name="City" type="text" id="City" size="30"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right"><font size="2">*State/Province:</font></td> <td colspan="2" height="22"><input name="State" type="text" id="State" size="30"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right"><font size="2">*Zip / Postal Code:</font></td> <td colspan="2" height="22"><input name="Zip" type="text" id="Zip" size="30"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right"><font size="2">Country:</font></td> <td colspan="2" height="22"><input name="Country" type="text" size="30"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right"><font size="2">Telephone:</font></td> <td width="202" height="22"><input name="Tel" type="text" size="30"></td> <td width="247" height="22"><font size="2">Ext: </font> <input name="Ext" type="text" size="9"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right"><font size="2">Fax:</font></td> <td colspan="2" height="22"><input name="Fax" type="text" size="30"></td> </tr> <tr> <td width="131" height="75" colspan="2" align="right"><p style="text-align: right; margin-top: 0; margin-bottom: 0"><font size="2"> Application </font></p> <p style="text-align: right; margin-top: 0; margin-bottom: 0"><font size="2"> or Question:</font> <p> </td> <td colspan="2" height="75"><textarea name="Application" style="width:425px; height: 75px;" rows="1" cols="20"></textarea></td> </tr> <tr> <td width="131" height="6" colspan="2" align="right"></td> <td colspan="2" height="6"><input type="checkbox" name="SendCatalog" value="Yes"> <font size="2"> Send me your latest catalog</font></td> </tr> <tr> <td height="34" colspan="2" align="right"> </td> <td colspan="2" height="34"><input type="checkbox" name="AddToMailingList" value="Yes"> <font size="2"> Add me to your mailing list</font></td> </tr> <tr> <td height="34" colspan="2" align="right"> </td> <td colspan="2" height="34"> <img id="imgCaptcha" src="create_image.php" /> <label for="message"><br> Enter the code above here :</label> <input id="txtCaptcha" type="text" name="txtCaptcha" value="" maxlength="10" size="32" /></td> </tr> <tr> <td height="34" colspan="2" align="right"> </td> <td colspan="2" height="34"><input id="btnCaptcha" type="button" value="Captcha Test" name="btnCaptcha" onClick="MM_validateForm('Name','','R','Email','','RisEmail','Emailconfirm','','RisEmail','Address1','','R','City','','R','State','','R','Zip','','R');return document.MM_returnValue; return ErrorCheck(); getParam(document.frmCaptcha)" value="Submit"> <input type="reset" value="Clear" name="Reset"></td> </tr> </table> </form></td> </tr> </table> <br> <table cellspacing="2" width=525 border=0 celpadding="3"> </table> </FORM> </body> Hi I want to add a CAPTCHA to my contact form as i have been getting hit badly by spammers was wondering if any one could give me some advice or script on how to do that....thanks in advance ah sorry i think this should be in php thread Hi, im trying to have a math captcha in my registration form, but having trouble with setting it up in my form. sorry for the large code. If i change the value of $_POST['Submit'] to something else like $_POST['Submit1'] and then same for the math image captcha then it works, but i would like it to work as part of the form, makes sense? lol right now the form just posts the value and doesnt check for captcha values! if someone could help me out here that would be great! thank you. <?php if(isset($_POST['Submit'])){ if($_POST['Submit'] != $_SESSION['security_number']) { $error = ""; } else { $error = ""; } //NEED TO CHECK IF FIELDS ARE FILLED IN if( empty($_POST['name']) && (empty($_POST['email']))){ header("Location:Messages.php?msg=3"); exit(); } if( empty($_POST['pw1']) && (empty($_POST['pw2']))){ header( "Location:Messages.php?msg=4" ); exit(); } $name=$_POST['name']; $email=$_POST['email']; $pw1=$_POST['pw1']; $pw2=$_POST['pw2']; if("$pw1" !== "$pw2" ){ header( "Location:Messages.php?msg=5" ); exit(); } $ip = $_SERVER['REMOTE_ADDR']; //connect to the db server , check if uname exist include('config.php'); $query1=("Select * from user where email='$email'"); $result1= mysql_query($query1); $num1=mysql_num_rows($result1); if ($num1 > 0) {//Email already been used header( "Location:Messages.php?msg=11" ); exit(); }else{ $query=("Select * from user where uname='$name'"); $result= mysql_query($query); $num=mysql_num_rows($result); if ($num > 0) {//Username already exist header( "Location:Messages.php?msg=6" ); exit(); }else{ //if username does not exist insert user details $query=( "INSERT INTO user (uname, pw,email,date_joined,ip,level) VALUES ('$name',md5('$pw1'),'$email',NOW(),'$ip','Normal')"); if (@mysql_query ($query)) { header("location:login.php?reg=1"); exit; } } } mysql_close(); } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><!-- InstanceBegin template="/Templates/Auth.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <!-- InstanceBeginEditable name="doctitle" --> <title>Registration</title> <!-- InstanceEndEditable --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <!-- InstanceBeginEditable name="head" --> <!-- InstanceEndEditable --> <link href="styleLog.css" rel="stylesheet" type="text/css"> <script language="javascript" type="text/javascript"> function reloadCaptcha() { document.getElementById('captcha').src = document.getElementById('captcha').src+ '?' +new Date(); } </script> </head> <body> <table width="100%" border="0" cellspacing="7" cellpadding="0"> <tr class="temptitle"> <td><!-- InstanceBeginEditable name="EditRegion4" -->New User Registration <!-- InstanceEndEditable --></td> </tr> <tr> <td><!-- InstanceBeginEditable name="EditRegion3" --> <form name="form1" action="register.php" method="post"> <table width="657" border="0"> <tr> <td width="122"><div align="left">Name</div></td> <td width="525"><input name="name" type="text" size="40"></td> </tr> <tr> <td><div align="left">Email</div></td> <td><input name="email" type="text" size="40"></td> </tr> <tr> <td><div align="left">Password</div></td> <td><input name="pw1" type="password" size="40"></td> </tr> <tr> <td ><div align="left">Confirm Password </div></td> <td><input name="pw2" type="password" size="40"></td> </tr> <tr> <td><img src="math_captcha/image.php" alt="Click to reload image" title="Click to reload image" id="captcha" onclick="javascript:reloadCaptcha()" /></td> <td><input type="text" name="Submit" value="what's the result?" onclick="this.value=''" /></td> <td> </tr> <tr> <td></td> <td> <input name="Submit" type="submit" value="Register"></td> </tr> </table> </form> <?=$error?> I'm stuck. I've got a form up, just about ready to go public, but I need to set it so that certain fields are required. In the past I've done this without any problem... Usually using just a hidden field, value="required" and listing the fields that are required. But, for some reason, it's not working on this form. Here's the form: http://www.weddingsbybelles.com/contact/survey.htm Quick fix? Is there another easy alternative? Any idea why my old standby stopped working? Hi all, I have an exam form wherein a student fills up all the details of the exam ad clicks on submit. The data is stored in an access database. I need to send all the fields in the form to an address specified in the form field as well as a confirmation email to a specific address. Please let me know how do i resolve this Regards, Nimish. I have a problem with my mandatory fields in the fact that i know not on how to make them mandatory. normally on a web page mandatory fields are yellow or sometimes other colours, and the non-mandatory fields are normally white. well i do have 3 yellow boxes on my page and then the rest are white, but the yellow boxes are not mandatory! I would like them to be but they are not. any help on how to make fields mandatory? http://prokix.com/OnlineRegistration.htm is the webpage Hi All, I have 2 buttons that need to be placed side by side and link to Paypal. I have used the "display:inline" on both forms and with the fields I need to hide, the "type=hidden" When I view the page in Firefox all looks, but in IE, although the hidden fields are hidden, they are still taking up space. So the two buttons are not sitting next to each other, there is a big gap where the 'hidden' layers would be. Anyone have any ideas how I can get around this? Many thanks Forgive me if this seems like a stupid question but I need help... I'm trying to do a simple online form that emails me the results from a few fields. Here is the code: Code: <form action="http://cm1web1/WebSurveyComponents/script/processform.asp" method="post"> <!-- Mandatory "hidden" objects --> <p> <input type="hidden" name="strInputElements" readonly value="Suggestion"> <input type="hidden" name="strInputElements" value="Name"> <input type="hidden" name="strInputElements" value="Email"> <input type="hidden" name="strInputElements" value="Business Unit"> <input type="hidden" name="intSendMode" readonly value="0"> <input type="hidden" name="strSendParms" readonly value="mark@website.com,CSPS Intranet Suggestion Box"> Name: <input type=text name="Name"> <br>(optional, but required if you would like a response to your comments or suggestions)</p> <p>Email: <input type=text name="Email"> <br>(optional) </p> <p>Business unit: <input type=text name="Business Unit"> <br>(optional) </p> <p> <textarea name="Suggestion" rows="12" cols="40">Write your feedback or suggestion here</textarea> <br> <br> <input name="Send" type="submit" value="Send"> <input name="Clear" type="reset" value="Clear"> </p> <p>(Unless you fill in your name and/or email, this form is completely anonymous)</p> </form> And the email I receive looks like this... Field = Suggestion Response = Write your feedback or suggestion here Field = Name Response = Field = Email Response = Field = Business Unit Response = The "Suggestion" field works fine, but the Name, Email and Business Unit fields all come through with blank responses. Any ideas? Thanks! Mark Hi all, I need your help. I have created an HTML web form that's processed by a PHP script. It works absolutely fine but I now need to do add a couple of conditional fields on this in this HTML Form which I don't know how to. The first field in the form is Presenter's Name. Underneath this field, I want to have a checkbox stating "Click here if additional Presenters". As soon as this option is checked off, a new input text field should appear underneath it and at the bottom of the form, a text box should appear for additional presenter's bio. How do I do that? Thanks a trillion in advance for your help. I've honest to god looked for 2 days for tutorials and pre set up scripts for this but cannot understand any of it. could someone please make all of my friends required, except for the radio buttons. i just need at least one of them selected. id really appreciate it. thank you. Quote: <form name="_xclick" action="https://www.paypal.com/us/cgi-bin/webscr" onSubmit="return emailCheck()" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="boxer_347@yahoo.com"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="item_name" value="Personal Plan"> <center> <table> <tr> <td> <input type="hidden" name="on1" value="name"><font size="2"><b>First Name:</b></font></td> <td> <input type="text" name="os1" maxlength="200"><font size="2" color="#666666"><br>(Your first name)<br><br></font></td> </tr> <tr> <td> <input type="hidden" name="on1" value="account"><font size="2"><b>Account Name:</b></font></td> <td> <input type="text" name="os1" maxlength="200"><font size="2" color="#666666"><br>(Register a cPanel username)<br><br></font></td> </tr> <tr> <td> <input type="hidden" name="on1" value="password"><font size="2"><b>Password:</b></font></td> <td> <input type="password" name="os1" maxlength="200"><font size="2" color="#666666"><br>(Register a cPanel password)<br><br></font></td> </tr> <tr> <td> <input type="hidden" name="on1" value="email"><font size="2"><b>Email Address:</b></font></td> <td> <input type="text" name="os1" maxlength="200"><font size="2" color="#666666"><br>(Email address we can contact you at)<br><br></font></td> </tr> <tr> <td> <input type="hidden" name="on1" value="domain"><font size="2"><b>Domain:</b></font></td> <td> <input type="text" name="os1" maxlength="200"><font size="2"> (Optional)</font><br><font size="2" color="#666666">(Domain you wish to link to us)</font></td> </tr> </table> </center> <br> <center> <table> <tr> <td> <input type="radio" name="amount" value="1.00"><b>1 Month - $1.00</b> </td> </tr> <tr> <td> <input type="radio" name="amount" value="2.70"><b>3 Months $2.70 (Save 10%)</b> </td> </tr> <tr> <td> <input type="radio" name="amount" value="4.92"><b>6 Months - $4.92 (Save 18%)</b> </td> </tr> <tr> <td> <input type="radio" name="amount" value="9.00"><b>1 Year - $9.00 (Save 25%)</b> </td> </tr> </table> </center> <center> <br> <table> <tr> <td> <input type="checkbox" name="agree" value="tos"> I agree to the <a STYLE="text-decoration:none" href="tos.html"><font size="2" color="#3999FF">Terms of Service</font></a> </td> </tr> </table> <br> <table> <tr> <td> <input type="image" src="https://www.paypalobjects.com/WEBSCR-480-20070831-2/en_US/i/btn/btn_buynowCC_LG.gif" style="float:right;" border="0" name="submit"> </td></tr> </table> </center> </form> Is there a way to insure that all form fields are reset to empty or default values upon entry to the page that contains the form? I'm asking this because if someone has already submitted a form and arrives at the next screen, that form has already been logged. If they go back, it gets logged again and I don't want that. I would prefer that the solution would involve HTML &/or PHP because many people have Java script disabled. But, if it can't be done with HTML or PHP, then so be it. I'll have to use Javascript. My first thought was to somehow disable the "Back" button but that is probably offensive to many, and I wouldn't want to alienate anyone. Maybe someone on this forum might have the answer to my question or may be able to suggest another approch I could use. Thanking you in advance, Roy I am trying to amend an existing form so that some fields are mandatory. So far this is what I've have on the script right before </head> tag: Code: <script type="text/javascript"> function checkForm(frm){ msg = ""; if(!frm.name.value){ msg += "- Name is required\n"; } if(!frm.phone.value){ msg += "- Phone is required\n"; } if(!frm.email.value){ msg += "- Email is required\n"; } if(msg != ""){ alert(msg); return false; } } </script> and on at the begining of the form itself I have: Code: <form id="form1" name="form1" method="post" action="contact1.php" onsubmit="return checkForm(this)"> <input type="text" name="name" id="name"><br> <input type="text" name="email" id="email" style="margin-top:3px "><br> <input type="text" name="phone" id="phone" style="margin-top:3px "><br> But when I get the form back on my test email all the fields are empty! Here here my contact.php: PHP Code: <? $subject="Booking Table from ".$_GET['name'] ; $headers= "From: ".$_GET['email']."\n"; $headers.='Content-type: text/html; charset=iso-8859-1'; mail("contactatalexotero.co.uk", $subject, " <html> <head> <title>Book Table</title> </head> <body> <br>Phone Number ".$_GET['phone']." <br>Number of people ".$_GET['people']." <br>Where? ".$_GET['where']." <br>Time ".$_GET['time']." <br>Date ".$_GET['day']."/ ".$_GET['month']."/ ".$_GET['year']." <br>Message ".$_GET['message']." </body> </html>" , $headers); echo ("Your message was successfully sent! We will contact you shortly to confirm your table!"); ?> <script> window.close </script> What do I do wrong? Please help me Hello Does anyone knows since when (or which html version) it is allowed to define form input names as arrays such as: ex: <form ...> <input name="MyArray[email]" /> <input name="MyArray[phone]" /> </form> Hi there, I have created a basic HTML Form but wish to make some fields mandatory. What code do i use to make the fields mandatory Thanks In advance Richard Hello, On a form I'm working on, I've set up the address fields as required. However, if the user selects the "International Residence" option, I'd like the address fields to be not required. Could someone point me in the right direction? Thanks a bunch, Mike I have created a nice Newsletter Registration form, but I would really like to modify the form so that instead of displaying the browsers default images for text fields, checkboxes, etc, I want it to display my images that I have created. Is this possible without stepping into flash? Thanks Guys! -NH Hello, I want to display users information into form fields if they are logged in. Is it possible to retrieve the data from mysql and display it in the form widgets ? Or should I create a complete new page ? (I would like user to be able to modify the text and automatically submit it to mysql). thanks firstly hello to everyone - sorry for not introducing myself prior to posting but im in DESPERATE need of help and hope someone will take pity on me and put me out my misery!!! I am trying to include an order form in a website i am building.. i would like it to have the ability to 'copy' information from 'customers details' to 'delivery details' if these are one and the same - i have tried various things all to no avail... here is what i have so far.... -------------------------------------------------------------------------------------------------------- <HTML> <head> <title></title> <script type="text/javascript"> function data_copy() { if(document.form1.copy[0].checked){ document.form1."Delivery Name".value=document.form1."Customer Name".value; document.form1."Delivery Address 1".value=document.form1."Customer Address 1".value; document.form1."Delivery Address 2".value=document.form1."Customer Address 2".value; document.form1."Delivery Town".value=document.form1."Customer Town".value; document.form1."Delivery County".value=document.form1."Customer County".value; document.form1."Delivery Post Code".value=document.form1."Customer Post Code".value; }else{ document.form1."Delivery Name".value=""; document.form1."Delivery Address 1".value=""; document.form1."Delivery Address 2".value=""; document.form1."Delivery Town".value=""; document.form1."Delivery County".value=""; document.form1."Delivery Post Code".value=""; } } </script> </head> <form name=form1 action=""> <TABLE width="800" border="0" align="center" cellpadding="5" cellspacing="0"> <tr bgcolor="#FFFFFF"> <td width="300" align="left"><font size="2" face="Verdana"><b>Customer Details:</b></font></td> <td width="200"></td> <td width="200"></td> <td width="300" align="left"><font size="2" face="Verdana"><b>Delivery Details:</b></font></td> <td width="200"></td> </tr> <tr> <td></td> <td></td> <td></td> <td><input type=radio name=copy value='yes' onclick="data_copy()";><font face="Verdana" size="2">Same As Customer</font></td> <td><input type=radio name=copy value='no' onclick="data_copy()";><font face="Verdana" size="2">Not Same</font></td> </tr> <tr bgcolor="#FFFFFF"> <td width="300" align="left"><font size="2" face="Verdana">Name:</font></td> <td width="200" align="left"><input name="Customer Name" type="text" size="30"></td> <td width="200"></td> <td width="300" align="left"><font size="2" face="Verdana">Name:</font></td> <td width="200" align="left"><input name="Delivery Name" type="text" size="30"></td> </tr> <tr bgcolor="#FFFFFF"> <td width="300" align="left"><font size="2" face="Verdana">Address 1:</font></td> <td width="200" align="left"><input name="Customer Address 1" type="text" size="30"></td> <td width="200"></td> <td width="300" align="left"><font size="2" face="Verdana">Address 1:</font></td> <td width="200" align="left"><input name="Delivery Address 1" type="text" size="30"></td> </tr> <tr bgcolor="#FFFFFF"> <td width="300" align="left"><font size="2" face="Verdana">Address 2:</font></td> <td width="200" align="left"><input name="Customer Address 2" type="text" size="30"></td> <td width="200"></td> <td width="300" align="left"><font size="2" face="Verdana">Address 2:</font></td> <td width="200" align="left"><input name="Delivery Address 2" type="text" size="30"></td> </tr> <tr bgcolor="#FFFFFF"> <td width="300" align="left"><font size="2" face="Verdana">Town:</font></td> <td width="200" align="left"><input name="Customer Town" type="text" size="30"></td> <td width="200"></td> <td width="300" align="left"><font size="2" face="Verdana">Town:</font></td> <td width="200" align="left"><input name="Delivery Town" type="text" size="30"></td> </tr> <tr bgcolor="#FFFFFF"> <td width="300" align="left"><font size="2" face="Verdana">County:</font></td> <td width="200" align="left"><input name="Customer County" type="text" size="30"></td> <td width="200"></td> <td width="300" align="left"><font size="2" face="Verdana">County:</font></td> <td width="200" align="left"><input name="Delivery County" type="text" size="30"></td> </tr> <tr bgcolor="#FFFFFF"> <td width="300" align="left"><font size="2" face="Verdana">Post Code:</font></td> <td width="200" align="left"><input name="Customer Post Code" type="text" size="15"></td> <td width="200"></td> <td width="300" align="left"><font size="2" face="Verdana">Post Code:</font></td> <td width="200" align="left"><input name="Delivery Post Code" type="text" size="15"></td> </tr> </table><br> <br><input type="Submit"> </form> </body> -------------------------------------------------------------------------------------------------------- although it looks ok when i preview it for some reason it will not copy the information i want... if anyone can help (and ideally explain what i am doing wrong) i would be very very thankful! kind regards lawrence (larryg) In a form, how do I define a radiobutton so that when it is selected additional form fields ara loaded onto the same page holding the text in other fields? I am using Frontpage 2003 to build my site. After putting all information in the Form, when I submit, new window opens and different Error Messege: Error: Blank Fields The following fields were left blank in your submission form: your_name These fields must be filled in before you can successfully submit the form. Please use your browser's back button to return to the form and try again. I checked, all fields.. non of them is empty... Pls any one can help me to fix, Here are codes: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> <meta name="generator" content="Adobe GoLive"> <title>Assessment Form</title> </head> <body bgcolor="#ffffff"> <p> <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="4" WIDTH="90%"> <TR> <form method=POST action="http://www.supremelegal.com/cgi-bin/formmail.pl" target="_top"> <INPUT TYPE="HIDDEN" NAME="recipient" VALUE="atharatsupremelegal.com"> <INPUT TYPE="HIDDEN" NAME="subject" VALUE="WebSite Contact"> <INPUT TYPE="HIDDEN" NAME="redirect" VALUE="http://www.supremelegal.com/thanks.htm"> <INPUT TYPE="HIDDEN" NAME="required" VALUE="email.com,your_name"> <input type=hidden name="sort" value="through,your_name,phone,company_name,email,comments"> <TD width="30%"><DIV align="right"> <B>Fist Name:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="Fist Name" size="40"> </TD> </TR> <TR> <TD width="30%"><DIV align="right"> <B>Last Name:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="Last Name" size="40"> </TD> </TR> <TR> <TD width="30%"><DIV align="right"> <B>Address:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="Address:" size="40"> </TD> </TR> <TR> <TD width="30%"><DIV align="right"> <B>City:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="City:" size="40"> </TD> </TR> <TR> <TD width="30%"><DIV align="right"> <B>State/Province:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="State/Province:" size="40"> </TD> </TR> <TR> <TD width="30%"><DIV align="right"> <B>Zip code & Country:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="Zip code & Country:" size="40"> </TD> </TR> <TR> <TD width="30%"><DIV align="right"> <B>Nationality:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="Nationality:" size="40"> </TD> </TR> <TR> <TD width="30%"><DIV align="right"> <B>Date of Birth:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="Date of Birth:" size="40"> </TD> </TR> <TR> <TD width="30%"><DIV align="right"> <B>E-mail Address:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="E-mail Address:" size="40"> </TD> </TR> <TR> <TD width="30%"><DIV align="right"> <B>Highest Level of education:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="Highest Level of education:" size="40"> </TD> </TR> <TR> <TD width="30%"><DIV align="right"> <B>Total years of education:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="Total years of education:" size="40"> </TD> </TR> <TR> <TD width="30%"><DIV align="right"> <B>Current occupation:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="Current occupation:" size="40"> </TD> </TR> <TR> <TD width="30%"><DIV align="right"> <B>Total years of full paid work experiance:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="Total years of full paid work experiance:" size="40"> </TD> </TR> <TR> <TD width="30%"><DIV align="right"> <B>English Language Proficiency:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="English Language Proficiency:" size="40"> </TD> </TR> <TR><td width="1%"></td> <TD colspan="2"> <p><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><input type="checkbox" name="option1" value="High"> High<br> <input type="checkbox" name="option2" value="Moderate"> Moderate<br> </font> </TD></TR> <TR> <TD width="30%"><DIV align="right"> <B>French Language Proficiency:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="French Language Proficiency:" size="40"> </TD> </TR> <TR><td width="1%"></td> <TD colspan="2"> <p><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><input type="checkbox" name="option1" value="High"> High<br> <input type="checkbox" name="option2" value="Moderate"> Moderate<br> </font> </TD> </TR> <TR> <TD width="30%"><DIV align="right"> <B>Marital Status:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="Marital Status:" size="40"> </TD> </TR> <TR> <TD width="30%"><DIV align="right"> <B>Name, age, qualification, work experiance of your partner:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="Name, age, qualification, work experiance of your partner:" size="40"> </TD> </TR> <TR> <TD width="30%"><DIV align="right"> <B>You or your partner ever worked or studied in Canada:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="You or your partner ever worked or studied in Canada:" size="20"> </TD> </TR> <TR> <TD width="30%"><DIV align="right"> <B>You or your partner have any relative willing to sponsor you in Canada:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="You or your partner have any relative willing to sponsor you in Canada:" size="20"> </TD> </TR> <TR> <TD width="30%"><DIV align="right"> <B>What is their legal status in Canada:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="What is their legal status in Canada:" size="20"> </TD> </TR> <TR> <TD width="30%"><DIV align="right"> <B>Any Employer in Canada willing to sponsor you, Full Name & Address:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="Any Employer in Canada willing to sponsor you, Full Name & Address:" size="20"> </TD> </TR> <TR> <TD width="30%"><DIV align="right"> <B>Do you or your partner plan to invest funds in Canada:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="Do you or your partner plan to invest funds in Canada:" size="20"> </TD> </TR> <TR> <TD width="30%"><DIV align="right"> <B>Upon immigration how much (CAD$)funds can you show:</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="Upon immigration how much (CAD$)funds can you show:" size="20"> </TD> </TR> <TR> <TD> <DIV align="right"><B>How did you hear about us:</B></DIV> </TD> <TD> <INPUT type="text" name="email" size="20"> </TD> </TR> <TR> <TD> <DIV align="right"> <B>If you have any question or comments:</B> </DIV> </TD> <TD> <TEXTAREA name="comment" cols="30" wrap="virtual"rows="4"> Here is my comment... </TEXTAREA> </TD></TR> <TR> <TD> </TD> <TD> <INPUT type="submit" name="submit" value="Submit"> <INPUT type="reset" name="reset" value="Reset"> </TD></TR> </TABLE> </FORM></p> </body> </html> Script is he http://www.supremelegal.com/test.html ( script is in cgi-bin folder and safe in formmail.pl format NOT html, it is only to show you guys).... {www/cgi-bin/formmail.pl } ...... thank you in advance.. |