Log in

View Full Version : Resolved Feedback Form



kaos
08-21-2009, 05:59 PM
Hello,

Could someone help me? I'm trying to make a simple feedback form that will send me it's contents in an email. However, if I use the mailto:(email here) command, it opens up Microsoft Outlook. I jest want it to send me the data. Can someone help me? Here's my code:


<form name="feedback" action="feedback-thank-you.html" onsubmit='return verifyMe();' method="post">
<table border=0 width=100%>
<tr>
<td width=10% align=left><font size=4><b>Name:</b></td><td><input type="text" name="name" id="name" maxlength="20" value=""></td>
</tr>
<tr>
<td width=10% align=left><font size=4><b>Email:</b></td><td><input type="text" name="email" id="email" maxlength="20" value=""></td>
</tr>
<tr>
<td width=10% align=left>
<font size=4><b>Subject:</b></td><td><select name="subject" id="subject">
<option value="ns">--Select A Subject--</option>
<option value="fb">Give me Feedback</option>
<option value="rp">Report a Problem</option>
<option value="gh">Get Help</option>
<option value="jc">Just Chat</option>
</select></td><td width=10%></td>
</tr>
<tr>
<td width=10% valign="top"><font size=4><b>Message:</b></td><td width=50%><textarea cols=30 rows=10 name="body" id="body"></textarea></td>
</tr>
</table>
<center><input type="submit" value="Send!"></center>
</form>

I also use this script (right before the form):

<script language='javascript'>
function verifyMe(){
var msg='';

if(document.getElementById('name').value==''){
msg+='- Name\n\n';}

var email=document.getElementById('email').value;
if(!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email))){
msg+='- Invalid Email Address: '+email+'\n\n';}

if(document.getElementById('email').value==''){
msg+='- Email\n\n';}

if(document.getElementById('subject').value=='ns'){
msg+='- Subject\n\n';}

if(document.getElementById('body').value==''){
msg+='- Message\n\n';}

if(msg!=''){
alert('The following fields are empty or invalid:\n\n'+msg);
return false
}else{
return true }

}
</script>

prasanthmj
08-22-2009, 04:30 AM
You need a script (written in PHP or perl) on the web server to send the form submission through email.

Please see: How to make a form (http://www.javascript-coder.com/html-form/how-to-make-a-form.phtml)
and
How to get email from an HTML form submission (http://www.html-form-guide.com/email-form/html-email-form.html)

kaos
08-23-2009, 12:58 AM
It's ok... I found some other site that helped me:

http://www.maketemplate.com/feedback/