Page 1 of 1

email form

Posted: Sun May 27, 2007 8:28 pm
by aussie_clint
hi, im trying to do a email form, can someone please let me know where im going wrong

thanks

Code: Select all

 
 <table width="682" height="522" border="0">

        <tr> 

          <form action="mailto:image@ccis.com.au" method="post" enctype="text/plain" >

            <td width="7" height="32" valign="top"><p><font color="#000000" size="2">&nbsp;</font></p></td>

            <td width="127" valign="top"><strong><span class="style1"><font color="#000000" size="2">Name:</font></span></strong></td>

            <td width="534" align="left" valign="top"><input name="Name" type="text" class="style1" size="45"></td>
          </form>
        </tr>

        <tr> 

          <td valign="top" height="32"><font color="#000000" size="2">&nbsp;</font></td>

          <td valign="top"><strong><span class="style1"><font color="#000000" size="2">Contact 

            Email:</font></span></strong></td>

          <td valign="top"align="left"><input name="ContactEmail" type="text" class="style1" size="45"></td>
        </tr>

        <tr> 

          <td valign="top" height="32"><font color="#000000" size="2">&nbsp;</font></td>

          <td valign="top"><strong><span class="style1"><font color="#000000" size="2">Contact 

            Phone:</font></span></strong></td>

          <td valign="top" align="left"><input name="ContactPhone" type="text" class="style1" size="45"></td>
        </tr>

        <tr> 

          <td valign="top" height="170"><font color="#000000" size="2">&nbsp;</font></td>

          <td valign="top"><strong><span class="style1"><font color="#000000" size="2">Message/Enquiry:</font></span></strong></td>

          <td valign="top" align="left"><textarea name="Message" cols="42" rows="10" class="style1"></textarea></td>
        </tr>

        <tr> 

          <td valign="top" height="26">&nbsp;</td>

          <td valign="top"><span class="style1"><font color="#62af3d">&nbsp;</font></span></td>

          <td valign="bottom" height="26" align="left"><input name="Submit" type="submit" class="submitButton" value="Send" onClick="javascript: Validate()">
          &nbsp;
          <input name="clear" type="reset" class="submitButton" value="Clear"></td><tr>
          <td valign="top" height="216">&nbsp;</td>
          <td valign="top">&nbsp;</td>
          <td valign="bottom" height="216" align="left">&nbsp;</td>
      </table>

Posted: Sun May 27, 2007 9:46 pm
by superdezign
Your form tags are the problem. You're defining your form as only having the input "Name." You don't even have your submit button inside of it.

Code: Select all

<form action="mailto:image@ccis.com.au" method="post" enctype="text/plain" >

            <td width="7" height="32" valign="top"><p><font color="#000000" size="2">&nbsp;</font></p></td>

            <td width="127" valign="top"><strong><span class="style1"><font color="#000000" size="2">Name:</font></span></strong></td>

            <td width="534" align="left" valign="top"><input name="Name" type="text" class="style1" size="45"></td>
          </form> 
You want the form to include everything, right? Put your <form> tag around the entire table.
I've got a lot more than that to.. complain about. However, I won't criticize this code any further. :-p



Oh, and beware of spam. :lol:

Posted: Mon May 28, 2007 4:50 am
by Ollie Saunders

Code: Select all

<form action="mailto:image@ccis.com.au"
I've never seen that before. I don't think you can do it like that.

Posted: Mon May 28, 2007 5:12 am
by Kieran Huggins
it can work, but it relies on the client's mail agent supporting it. It's extremely unreliable and should be avoided at all costs!

Posted: Mon May 28, 2007 7:26 am
by superdezign
:-p

Didn't want to say anything. That's the way I was taught to first create forms. I believe I learned all of my beginner HTML at HTML Goodies a good ten years ago. They... simplified everything. A lot.