Location: PHPKode > scripts > MailForm > mailform/contact.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
 <head>
  <title> Contact Us </title>
<style type="text/css" media=screen>
<!--
fieldset { 
width: 500px;
border: 1px solid #e2e2e2;
padding-left: 5px;
}
-->
</STYLE>
 </head>

 <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#0000ff" alink="#0000ff">
<script type="text/javascript">
<!--

function formCheck(formobj){
	//1) Enter name of mandatory fields
	var fieldRequired = Array("name","phone","email","msg");
	//2) Enter field description to appear in the dialog box
	var fieldDescription = Array("Name","Phone Number","E-Mail Address","Your Message");
	//3) Enter dialog message
	var alertMsg = "Please fill in the following fields:\n";
	
	var l_Msg = alertMsg.length;
	
	for (var i = 0; i < fieldRequired.length; i++){
		var obj = formobj.elements[fieldRequired[i]];
		if (obj){
			switch(obj.type){
			case "select-one":
				if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == "Please Select One"){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "select-multiple":
				if (obj.selectedIndex == -1){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "text":
			case "textarea":
				if (obj.value == "" || obj.value == null){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			default:
				if (obj.value == "" || obj.value == null){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
			}
		}
	}

	if (alertMsg.length == l_Msg){
		return true;
	}else{
		alert(alertMsg);
		return false;
	}
}
//-->
</script>
<h2>Contact Us</h2>
<fieldset><legend>Contact Form</legend>
<form action="mail.php" method="post" onsubmit="return formCheck(this);">
<input type="hidden" name="contact" value="1" />
Your Name<br />
<input name="name" type="text" rows=1 value="" size="37"><br />
Your Phone Number<br />
<input name="phone" type="text" rows=1 value="" size="37"><br />
Your E-Mail Address (for our use only)<br />
<input name="email" type="text" rows=1 value="" size="37"><br />
Your Message<br /><textarea name="msg" rows="3" wrap="physical" cols="50" maxLength="1000"></textarea>
<br /><br />
<input id="button" type="submit" value="SEND"></form>
</fieldset>
<p><font size="small">Webmail Form Powered by <a href="http://www.bluewavedata.com" title="Custom Web Applications">Blue Wave Data LLC</a></font><br />
&copy 2008 Blue Wave Data, LLC</p>
 </body>
</html>
Return current item: MailForm