View Single Post
Old 01-24-2013, 12:39 PM   PM User | #1
Rowan88
New to the CF scene

 
Join Date: Jan 2013
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rowan88 is an unknown quantity at this point
Make Fields Validate On Submit?

Hi,

I just finished creating my Contact Us Form and it all works perfectly. The only problem I have is that you can type whatever you want in the fields and it sends.

Can someone please show me how I can make the fields I have * next to required and also that they are putting the right stuff in the field (ie email not in a telephone field).

I use dreamweaver cs6 and heres my form code:

Code:
<form id="contactformsend.php" name="form1" method="post" action="contactformsend.php">
  <table width="360" border="0" cellpadding="5">
    <tr>
      <td class="contactheaders"><label for="name">Full Name : <span class="astrix">*</span></label></td>
      <td width="197"><input name="name" type="text" id="name" size="34" /></td>
    </tr>
    <tr>
      <td class="contactheaders"><label for="email">Email Address : <span class="astrix">*</span></label></td>
      <td><input name="email" type="text" id="email" size="34" /></td>
    </tr>
    <tr>
      <td class="contactheaders"><label for="telephone">Telephone : </label></td>
      <td><input name="telephone" type="text" id="telephone" size="34" /></td>
    </tr>
    <tr>
      <td class="contactheaders"><label for="subject">Subject : <span class="astrix">*</span></label></td>
      <td><input name="subject" type="text" id="subject" size="34" /></td>
    </tr>
    <tr>
      <td class="contactheaders"><label for="description">Description : <span class="astrix">*</span></label></td>
      <td><textarea name="description" id="description" cols="25" rows="10"></textarea></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="submit" name="submit" id="submit" value="Submit" />
      <input type="reset" name="reset" id="reset" value="Reset" /></td>
    </tr>
  </table>
</form>
Thanks,
Rowan88 is offline   Reply With Quote