PDA

View Full Version : Feedback Form


indianleo
12-31-2007, 03:50 AM
Dear Friends
Pls help in creating a feedback form in html on clicking the submit buton i should get the email of the filled form

edbr
12-31-2007, 04:45 AM
all you need is to make a form with the details you want, then set the action to a mail send handler, either php or perl. your server may already have one installed so you will need the path for it.

fwr1000
12-31-2007, 12:21 PM
See this tutorial in the DW club tutorials

http://www.dreamweaverclub.com/dreamweaver-php-form.php

cocoonfx
12-31-2007, 04:19 PM
Hello I thought i be nice, here is a html and java email form.

There are loads of tutorials out there i would recommend having a search through the forum as well. Also if you have a stab at the code you often get more help as well. :lol:

I would also look at php scripts as you can do a lot more.

Code below:



<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<title>JavaScript Form validation</title>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
function check() {
var nameandsurname = document.myform.nameandsurname;
var email = document.myform.email;
var age = document.myform.age;
var gender = document.myform.gender;
if ( nameandsurname.value.indexOf(" ") == -1) {
alert("Enter your Name and Surname.");
nameandsurname.focus();
} else if ((email.value.indexOf("@") == -1) || (email.value.indexOf(".") == -1)) {
alert("Enter your valid email address.");
email.focus();
} else if (! (parseInt(age.value) > 0)) {
alert("Enter your Age.");
age.focus();
} else if (gender.selectedIndex == 0) {
alert("Select your gender.");
gender.focus();
} else {
document.myform.submit();
}
}
</SCRIPT>
</head>
<body>
<form action="mailto:info@cocoonfxmedia.co.uk" method="post" name="myform">
Name and Surname: <br/>
<input type="text" name="nameandsurname" size="30"> <br/>
Email: <br/>
<input type="text" name="email" size="30"> <br/>
Age: <br/>
<input type="text" name="age" size="3"> <br/>
Gender: <br/>
<select size="1" name="gender">
<option>- Select gender -</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
<br/>
<input type="submit" value="Submit" onClick="check();return false;">
</form>
<br/>
<b><a href="<A href="http://www.cocoonfxmedia.co.uk">Cocoonfxmedia</a></b">http://www.cocoonfxmedia.co.uk">Cocoonfxmedia</a></b>
</body>
</html>

fwr1000
12-31-2007, 04:46 PM
Cocoonfix was nice and gave you a javascript for the e mail. Be careful though, with javascript your e mail addresses in the script can be "harvested" by bots and you can end up with a lot of spam. The PHP script in the tutorial will eliminate this as the PHP e mail address is on the server and the bots can't see it there. Good luck.

cocoonfx
12-31-2007, 04:56 PM
Thanks for the info, i only use PHP on my sites. This is a quick example i found many moons ago when i was looking to do forms.

indianleo
01-03-2008, 09:29 AM
Thanks all of you for replying me but still i am not able o create form and when clicking on the submit the pfp file is opening
kindly check the attachment and pls let me know where I did a mistake

davidj
01-03-2008, 10:19 AM
do you have PHP installed?

indianleo
01-03-2008, 11:53 AM
yes i have installed PHP

davidj
01-03-2008, 12:57 PM
please tell me why do you have a form tag wrapped around each form element

you have been doing this for such a long time indianleo i would have though setting up a form to be elementary

indianleo
01-04-2008, 03:49 AM
No bro I had never created a feedback form thats y i m here at this forum coz I had learnt lots of things from this forum

davidj
01-04-2008, 05:56 AM
indianleo

i downloaded your zip and viewed the source of the form

can anyone spot the problem here


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<table width="575" border="0" align="center" cellpadding="0" cellspacing="0" id="contact form">
<tr>
<td width="149">&nbsp;</td>
<td width="15">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><form id="contact form" name="contact form" method="post" action="sendresults.php">
<label>
<input name="Name" type="text" id="Name" />
</label>
</form> </td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><form id="contact form" name="contact form" method="post" action="sendresults.php">
<label>
<input name="Last name" type="text" id="Last name" />
</label>
</form> </td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><form id="contact form" name="contact form" method="post" action="sendresults.php">
<label>
<input name="email" type="text" id="email" />
</label>
</form> </td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><form id="contact form" name="contact form" method="post" action="sendresults.php">
<label></label>
<textarea name="comments" rows="5" id="comments"></textarea>
</form> </td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td align="right"><form id="contact form" name="contact form" method="post" action="sendresults.php">
<label>
<input type="submit" name="Submit" value="Submit" />
</label>
</form> </td>
<td>&nbsp;</td>
<td><form id="contact form" name="contact form" method="post" action="sendresults.php">
<label>
<input name="Reset" type="reset" id="Reset" value="Reset" />
</label>
</form> </td>
</tr>
</table>
<label></label>
</body>
</html>


mate

you really need to think of another path in life.

This is not your future

domedia
01-04-2008, 02:36 PM
Leo you need to get the basics down. Look in DW's help files for how to create a form. There's plenty of tutorials on how to do this, but you *really* need to get the basics down before asking for help. You've been in this forum for over a year and I know you have the will, you just have to dive into it and learn :)