Jump to content

Contact Form Help..


SuperPaperSam

Recommended Posts

I'm using a downloadable contact form (Un-edited version) but I don't know what to put in the following places. (Look at code)

   $EmailFrom = "junk@junk.com";									   // What do I do with this?	$EmailTo = "junk@junk.com";										 // Is this the E-mail that the info will be sent to?	$Subject = "Mydomain -- Contact";							   // I know what this is :)		$Name = Trim(stripslashes($_POST['Name']));					// No Idea	$Tel = Trim(stripslashes($_POST['Tel']));						 // Still no idea	$Email = Trim(stripslashes($_POST['Email']));				   // You guessed it no idea	$Message = Trim(stripslashes($_POST['Message']));		// Dont know what to put :(

But I also what the form to all be in a single row. Now It has the "Name" and "Email" on the left and the "message" on the right. How would I fix this?Bellow I have all the code you should need.Code in html page...

		   $(document).ready(function(){			 			 $("#formLeft .input-bg").hover(function() {				$(this).addClass("active");			 }, function() {				$(this).removeClass("active");			 });			 			 $("#formLeft input").focus(function() {				$(this).parent().addClass("active");			 });			 $("#formLeft input").blur(function() {				$("#formLeft .input-bg").removeClass("active");			 });			 			 $("#formRight .message-bg").hover(function() {				$(this).addClass("active");			 }, function() {				$(this).removeClass("active");			 });			 			 $("#formRight textarea").focus(function() {				$(this).parent().addClass("active");			 });			 $("#formRight textarea").blur(function() {				$("#formRight .message-bg").removeClass("active");			 });			 			 $("#commentForm").validate();		  });

Code in CSS...

* { margin: 0; padding: 0; }	body { font-size: 62.5%; font-family: Georgia, serif; background: url(images/page-bg.jpg); }	.clear { clear: both; }	fieldset { border: none; }	input, textarea, a { outline: none; }		#page-wrap {	   width: 800px;	   margin: 0 auto;	   background: url(images/form-bg.jpg) top center no-repeat;	   min-height: 600px;	}	form {	   padding: 83px 0 0 76px;	}	h1 {	   text-align: center;	   padding-top: 200px;	}	#formLeft {	   width: 320px;	   float: left;	   }	   #formLeft input {		  width: 250px;		  margin: 0 0 20px 0;		  border: none;		  text-align: center;		  background: none;		  margin: 13px 0 0 8px;		  font-size: 1.4em;	   }	   #formLeft .input-bg {		  background: url(images/form-sm-bg.jpg) bottom left no-repeat transparent;		  height: 45px;		  margin-bottom: 10px;		  position: relative;	   }	   #formLeft .active {		  background: url(images/form-sm-bg.jpg) top left no-repeat transparent;	   }	#formRight {	   width: 360px;	   float: right;	   padding-right: 44px;	   }	   #formRight textarea {		  width: 298px;		  height: 209px;		  display: block;		  border: none;		  background: none;		  margin: 0 0 0 20px;		  padding: 13px 0 13px 0;		  font-family: Helvetica, sans-serif;		  font-size: 1.3em;		  overflow: auto;	   }	   #formRight .message-bg {		  background: url(images/message-bg.jpg) bottom left no-repeat transparent;		  height: 238px;	   }	   #formRight .active {		  background: url(images/message-bg.jpg) top left no-repeat transparent;	   }

Sorry about all the code but I'm not to great with this kind of thing (IMG:style_emoticons/default/sad.gif) If you could put the corrected code that would be awesome but any help would be greatly appreciated!

Link to comment
Share on other sites

	$EmailFrom = "junk@junk.com";									 // Sending mail FROM this address	$EmailTo = "junk@junk.com";										 // Sending mail TO this address	$Subject = "Mydomain -- Contact";								  // I know what this is :)		$Name = Trim(stripslashes($_POST['Name']));				 // all of 	$Tel = Trim(stripslashes($_POST['Tel']));						 //  this is	$Email = Trim(stripslashes($_POST['Email']));				  // to put whatever the person puts down on the page	$Message = Trim(stripslashes($_POST['Message']));		 //  and puts what they put down into PHP variables the '$' starts the variable.																						// don't have to mess with it

Seems like you're going to have to post your HTML, for your second issue. You only posted what looks like PHP code which parses HTML. But yeah, we need your HTML code.

Link to comment
Share on other sites

Ok thanks for clarifying!This is all the code I'm using...HTML...

	   <!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=UTF-8" />				 <link rel="stylesheet" type="text/css" href="style.css" />				 <script type="text/javascript" src="js/jquery-1.2.6.min.js"></script>				 <script type="text/javascript" src="js/jquery.validate.js"></script>				 <script type="text/javascript">				 $(document).ready(function(){					 					 $("#formLeft .input-bg").hover(function() {						 $(this).addClass("active");					 }, function() {						 $(this).removeClass("active");					 });					 					 $("#formLeft input").focus(function() {						 $(this).parent().addClass("active");					 });					 $("#formLeft input").blur(function() {						 $("#formLeft .input-bg").removeClass("active");					 });					 					 $("#formRight .message-bg").hover(function() {						 $(this).addClass("active");					 }, function() {						 $(this).removeClass("active");					 });					 					 $("#formRight textarea").focus(function() {						 $(this).parent().addClass("active");					 });					 $("#formRight textarea").blur(function() {						 $("#formRight .message-bg").removeClass("active");					 });					 					 $("#commentForm").validate();				 });				 </script>			 </head>			 <body>		 				 <div id="page-wrap">				 					 <form method="post" action="contactengine.php" id="commentForm">						 <fieldset>						 <div id="formLeft">						 							 <label for="Name">Name:</label>							 <div class="input-bg">								 <input type="text" name="Name" id="Name" class="required" minlength="2" />							 </div>							 							 <label for="City">City:</label>							 <div class="input-bg">								 <input type="text" name="City" id="City" class="required" minlength="2" />							 </div>							 							 <label for="Email">Email:</label>							 <div class="input-bg">								 <input type="text" name="Email" id="Email" class="required email" />							 </div>							 						 </div>						 						 <div id="formRight">							 <label for="Message">Message:</label></td>							 <div class="message-bg">								 <textarea name="Message" id="Message" rows="20" cols="20" class="required"></textarea>							 </div>							 		 							 <input type="image" src="images/send-button.jpg" name="submit" value="Submit" class="submit-button" />						 </div>						 						 <div class="clear"></div>						 </fieldset>					 </form>				 				 </div>				 				 <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">				 </script>				 <script type="text/javascript">				 _uacct = "UA-68528-29";				 urchinTracker();				 </script>			 </body>		 </html>

I can't thank you enough I have been messing with this form for hours with little results your a life website saver!

Link to comment
Share on other sites

Hi, i don't know if this what your looking for but you could accomplish that easily with a table ----------------------------------------------------------------------------------------| name |______| city |_______| email |________| message |_______|----------------------------------------------------------------------------------------of course you have to do a massive modification (massive as the css and html must be changed), but anyway the field names must be style, the input would be better with a size="#", the textarea with cols="#" rows="#", the advantage is your form is going to be nice and clean before the styles load (those terrible 100 something milisecs), all this unless you have a good reason to avoid the table. :)

Link to comment
Share on other sites

  • 2 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...