June 12, 201016 yr Hi all I'm new to this forum so I do apologise if I've posted this in the wrong section. Anyway, I'm creating a website as part of my college assignment and I was wondering if I could get some help creating an enquiry form. I found this code on the internet. <div id="contsearch"> <form name="feedback" action="/contactus/standardfeedbackform/?lang=_e" method="post" onSubmit="return checkFeedbackEntries();"> <table width="467" border="0"> <tr> <td><label for="title">Title</label></td> <td> <select name="title"> <option value="Mr">Mr</option> <option value="Mrs">Mrs</option> <option value="Ms">Ms</option> <option value="Miss">Miss</option> <option value="Dr">Dr</option> </select> </td> </tr> <tr> <td><label for="first name">First Name</label></td> <td> <input type="text" name="firstname" size="20"> </td> </tr> <tr> <td><label for="last name">Last Name</label></td> <td> <input type="text" name="lastname" size="20"> </td> </tr> <tr> <td><label for="company name">Company Name</label></td> <td> <input type="text" name="companyname" size="20"> </td> </tr> <tr> <td><label for="postal address">Postal Address</label></td> <td> <textarea name="postaladdress" cols="30" wrap="VIRTUAL"></textarea> </td> </tr> <tr> <td><label for="town">Town</label></td> <td> <input type="text" name="town" size="20"> </td> </tr> <tr> <td><label for="post code">Post code</label></td> <td> <input type="text" name="postalcode" size="20"> </td> </tr> <tr> <td><label for="country">Country</label></td> <td> <input type="text" name="country" size="20"> </td> </tr> <tr> <td><label for="telephone">Telephone</label></td> <td> <input type="text" name="telephone" size="20"> </td> </tr> <tr> <td><label for="fax">Fax</label></td> <td> <input type="text" name="fax" size="20"> </td> </tr> <tr> <td><label for="e-mail">E-mail</label></td> <td> <input type="text" name="email" size="20"> </td> </tr> <tr> <td><label for="your enquiry">Your Enquiry</label></td> <td colspan="2"> <textarea name="comments" cols="30" rows="10" wrap="VIRTUAL"></textarea> </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> <input type="submit" name="Submit" value="Submit"> <input type="Reset" name="Submit2" value="Reset"> </td> </tr> </table> </form> </div> It looks something like this: This is exactly what I need, but how can I modify the code so that once the form is filled in and the user clicks 'Submit', all the details would get sent to my email? Is it possible at all? Thanks in advance!
June 13, 201016 yr It is possible, and is a very common way of handling form data. I'm not really experienced in doing it myself, but if you search google there are lots of tutorials and example scripts. Here's a start: http://www.javascript-coder.com/html-form/html-form-email.phtml
June 13, 201016 yr For you're reference, and future reference. You can see an example of the php that would process a form here: http://webprocafe.com/php/566-php-hypertext-preprocessor-contact-form-problems.html#post3769 And then for people who like making things pretty, how to submit a form via ajax http://www.webdesignerforum.co.uk/topic/20491-ajax-form-handling/page__view__findpost__p__141993
June 13, 201016 yr Author Thanks for all the responses. I ended up using this: http://www.foxyform.com/ which I thought was a lot easier and more hassle-free because it does it all for you. However, when I pasted the code into my website, it completely messed up the structure. I looked to see if I had accidentally deleted some of the old code but it was all there. This is what happened: And this is what the structure is supposed to look like: Btw, this is the code I used for the form: <!-- Do not change code! --> <table cellspacing="0" cellpadding="0" border="0"><tr><td><iframe width="400" height="490" frameborder="0" src="http://www.foxyform.com/form.php?id=29521&sec_hash=0c2bb6b91df"></iframe></td></tr><tr><td align="center"><a style="font:8px Arial;color:#5C5C5C;" href="http://www.foxyform.com">Contact Form</a></td></tr></table> <!-- Do not change code! --> Any suggestions? Thanks
June 13, 201016 yr Try this. <!-- Do not change code! --> <table cellspacing="0" cellpadding="0" border="0" style="float:left";><tr><td><iframe width="400" height="490" frameborder="0" src="http://www.foxyform.com/form.php?id=29521&sec_hash=0c2bb6b91df"></iframe></td></tr><tr><td align="center"><a style="font:8px Arial;color:#5C5C5C;" href="http://www.foxyform.com">Contact Form</a></td></tr></table> <!-- Do not change code! -->
June 13, 201016 yr Author Try this. <!-- Do not change code! --> <table cellspacing="0" cellpadding="0" border="0" style="float:left";><tr><td><iframe width="400" height="490" frameborder="0" src="http://www.foxyform.com/form.php?id=29521&sec_hash=0c2bb6b91df"></iframe></td></tr><tr><td align="center"><a style="font:8px Arial;color:#5C5C5C;" href="http://www.foxyform.com">Contact Form</a></td></tr></table> <!-- Do not change code! --> Thanks for the reply bocaj Unfortunately, nothing changed. Got exactly the same result as before :/
June 13, 201016 yr Try this then <!-- Do not change code! --> <table cellspacing="0" cellpadding="0" border="0"><tr><td><iframe width="400" height="490" frameborder="0" src="http://www.foxyform.com/form.php?id=29521&sec_hash=0c2bb6b91df"></iframe></td></tr><tr><td align="center"><a style="font:8px Arial;color:#5C5C5C;" href="http://www.foxyform.com">Contact Form</a></td></tr></table><br style="clear:both" /> <!-- Do not change code! -->
June 13, 201016 yr Author Try this. <!-- Do not change code! --> <table cellspacing="0" cellpadding="0" border="0" style="float:left";><tr><td><iframe width="400" height="490" frameborder="0" src="http://www.foxyform.com/form.php?id=29521&sec_hash=0c2bb6b91df"></iframe></td></tr><tr><td align="center"><a style="font:8px Arial;color:#5C5C5C;" href="http://www.foxyform.com">Contact Form</a></td></tr></table> <!-- Do not change code! --> Nope. Same thing Would it help if I send the actual page (html file)? Thanks
Create an account or sign in to comment