View Full Version : Form Help!!!


Ryan Szablewski
04-13-2006, 11:43 PM
Hi, Does anyone know how to make the following code for a form work?

<form action="" id="form">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="height:100%;">
<tr><td valign="top" style="padding:5px 0px 0px 1px;"><img src="images/title_5_2.gif" width="81" height="13" alt="" style="margin:0px 0px 19px 0px; "></td>
</tr>
<tr><td><input name="Your Name:" type="text" id="Your Name:" value="Your Name:"></td></tr>
<tr><td><input type="text" value="E-Mail:"></td></tr>
<tr><td><input type="text" value="Phone:"></td></tr>
<tr><td><input type="text" value="Fax:"></td></tr>
<tr><td><textarea rows="3" cols="3">Comments:</textarea></td></tr>
<tr><td valign="top" style="padding:6px 0px 0px 0px; " height="100%" align="right">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="100%"><img src="images/spacer.gif" width="1" height="1" alt=""></td>
<td nowrap valign="top" class="more"><a href="#" onClick="document.getElementById('form').reset()">reset</a><img src="images/marker_more.gif" width="3" height="8" alt="" align="middle" hspace="6"></td>
<td><img src="images/spacer.gif" width="21" height="1" alt=""></td>
<td nowrap valign="top"align="right" class="more"><a href="#" onClick="document.getElementById('form').submit()">submit</a><img src="images/marker_more.gif" width="3" height="8" alt="" align="middle" hspace="6"></td>
</tr>
</table>
</td></tr>
</table>
</form>

Im trying to use it on my website with dreamweaver, but i have no idea how to make it "workable"... any suggestions?

HeLpM3
04-14-2006, 12:24 AM
Hi, Does anyone know how to make the following code for a form work?

<form action="" id="form">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="height:100%;">
<tr><td valign="top" style="padding:5px 0px 0px 1px;"><img src="images/title_5_2.gif" width="81" height="13" alt="" style="margin:0px 0px 19px 0px; "></td>
</tr>
<tr><td><input name="Your Name:" type="text" id="Your Name:" value="Your Name:"></td></tr>
<tr><td><input type="text" value="E-Mail:"></td></tr>
<tr><td><input type="text" value="Phone:"></td></tr>
<tr><td><input type="text" value="Fax:"></td></tr>
<tr><td><textarea rows="3" cols="3">Comments:</textarea></td></tr>
<tr><td valign="top" style="padding:6px 0px 0px 0px; " height="100%" align="right">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="100%"><img src="images/spacer.gif" width="1" height="1" alt=""></td>
<td nowrap valign="top" class="more"><a href="#" onClick="document.getElementById('form').reset()">reset</a><img src="images/marker_more.gif" width="3" height="8" alt="" align="middle" hspace="6"></td>
<td><img src="images/spacer.gif" width="21" height="1" alt=""></td>
<td nowrap valign="top"align="right" class="more"><a href="#" onClick="document.getElementById('form').submit()">submit</a><img src="images/marker_more.gif" width="3" height="8" alt="" align="middle" hspace="6"></td>
</tr>
</table>
</td></tr>
</table>
</form>

Im trying to use it on my website with dreamweaver, but i have no idea how to make it "workable"... any suggestions?
umm you dont have the method attribute in forme should look like this with it

<form action="" id="form" method="post">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="height:100%;">
<tr><td valign="top" style="padding:5px 0px 0px 1px;"><img src="images/title_5_2.gif" width="81" height="13" alt="" style="margin:0px 0px 19px 0px; "></td>
</tr>
<tr><td><input name="Your Name:" type="text" id="Your Name:" value="Your Name:"></td></tr>
<tr><td><input type="text" value="E-Mail:"></td></tr>
<tr><td><input type="text" value="Phone:"></td></tr>
<tr><td><input type="text" value="Fax:"></td></tr>
<tr><td><textarea rows="3" cols="3">Comments:</textarea></td></tr>
<tr><td valign="top" style="padding:6px 0px 0px 0px; " height="100%" align="right">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="100%"><img src="images/spacer.gif" width="1" height="1" alt=""></td>
<td nowrap valign="top" class="more"><a href="#" onClick="document.getElementById('form').reset()">reset</a><img src="images/marker_more.gif" width="3" height="8" alt="" align="middle" hspace="6"></td>
<td><img src="images/spacer.gif" width="21" height="1" alt=""></td>
<td nowrap valign="top"align="right" class="more"><a href="#" onClick="document.getElementById('form').submit()">submit</a><img src="images/marker_more.gif" width="3" height="8" alt="" align="middle" hspace="6"></td>
</tr>
</table>
</td></tr>
</table>
</form>

Ryan Szablewski
04-14-2006, 12:50 AM
Okay, but i still cant enter info and then submit it somewhere... is there anything i have to do with the email and stuff.... also, how do i get the "submit" text to submit stuff?

pubicusqualitas
04-14-2006, 01:37 AM
There is a few things that you need to address within your code.

First off, you don't have a script to call on. I'm not sure if you left this blank for a reason, or what.

<form action="" id="form">

<form action="ENTER SCRIPT NAME HERE" id="form">


Another thing is that you don't have a name field for any of your <INPUT>'s.

<tr><td><input name="Your Name:" type="text" id="Your Name:" value="Your Name:"></td></tr>
<tr><td><input type="text" value="E-Mail:"></td></tr>
<tr><td><input type="text" value="Phone:"></td></tr>
<tr><td><input type="text" value="Fax:"></td></tr>
<tr><td><textarea rows="3" cols="3">Comments:</textarea></td></tr>

<tr><td><input name="name" type="text" id="Your Name:" value="Your Name:"></td></tr>
<tr><td><input type="text" value="E-Mail:" name="email"></td></tr>
<tr><td><input type="text" value="Phone:" name="phone"></td></tr>
<tr><td><input type="text" value="Fax:" name="fax"></td></tr>
<tr><td><textarea rows="3" cols="3" name="comments">Comments:</textarea></td></tr>


Well, Ryan, I hope that gets you off to a good start. I'd also recommend cleaning up your code a bit.

Well... Ciao.

Ryan Szablewski
04-16-2006, 03:53 PM
Okay, thanks for that, I took care of all of that stuff, but how do i get it to email to me when someone enters stuff in?

Apollo_gal
04-16-2006, 04:23 PM
Hey. I think i can help

<FORM METHOD="POST" ACTION="mailto:your email address">

put this after <form>

i think that will work. remember to change the email address

hope that helped. reply of it did or even if it didnt plz

Ryan Szablewski
04-16-2006, 06:58 PM
It didnt help completely but it helped me remember to put that in... i was forgetting that so i guess then it did help and what im trying to say is that that wasnt the only problem lol... here is my code now.

<form method="post" action="mailto:rjs2006@wi.rr.com" id="contactform">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="height:100%;">
<tr><td height="38" valign="top" style="padding:5px 0px 0px 1px;"><div align="center"><img src="images/title_5_2.gif" alt="" style="margin:0px 0px 19px 0px; "></div></td>
</tr>
<tr><td><input name="name" type="text" id="Your Name:" value="Your Name:"></td></tr>
<tr><td><input name="eamil" type="text" id="E-Mail" value="E-Mail:"></td></tr>
<tr><td><input name="phone" type="text" id="Phone" value="Phone:"></td></tr>
<tr><td><input name="fax" type="text" id="Fax" value="Fax:"></td></tr>
<tr><td><textarea rows="3" cols="3" name="comments">Comments:</textarea></td></tr>
<tr><td valign="top" style="padding:6px 0px 0px 0px; " height="100%" align="right">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="100%"><img src="images/spacer.gif" width="1" height="1" alt=""></td>
<td nowrap valign="top" class="more"><a href="#" onClick="document.getElementById('form').reset()"> reset</a><img src="images/marker_more.gif" width="3" height="8" alt="" align="middle" hspace="6"></td>
<td><img src="images/spacer.gif" width="21" height="1" alt=""></td>
<td nowrap valign="top"align="right" class="more"><a href="rjs2006@wi.rr.com" onClick="document.getElementById('form').submit()" >submit</a><img src="images/marker_more.gif" width="3" height="8" alt="" align="middle" hspace="6"></td>
</tr>
</table>
</td></tr>
</table>
</form>


I also played around with the submit button, but to no avail...

<a href="rjs2006@wi.rr.com" onClick="document.getElementById('form').submit()" >submit</a>

This form kinda stinks because I didnt make it, it came with a template that I bought and am trying to edit... otherwise i would be able to just create one from scratch but murphy's law wont allow it.

Ryan Szablewski
04-18-2006, 06:16 AM
any other suggestions? this is a pain in the keister lol...

Paco
04-18-2006, 09:16 AM
You could use a php one

<form method="post" action="process.php"><input type="text" value="Name" id="name" name="name" /><br />
<input type="text" value="Email" id="email" name="email" /><br />
<input type="text" value="URL" id="url" name="url" /><br />
<textarea id="comments" name="comments"> Comments </textarea></form>

That goes on your page that you want the form.

And then you need this

<?php



$name = $_POST['name'];

$email = $_POST['email'];

$url = $_POST['url'];

$comments = $_POST['comments'];



$recipient = "your email";

$subject = "subject here";



$message = "Name: $name \n";

$message .= "E-mail: $email \n";

$message .= "URL: $url \n";

$message .= "Comments: $comments \n\n";



$headers = "From: My Form \n";

$headers .= "Reply-To: $email";



mail($recipient,$subject,$message,$headers);



?>

Just change the email and subject, and make sure that you name it as process.php.