PDA

View Full Version : looking for making messaging fields required. Please Help



teddyc0777
Feb 22nd, 2012, 08:29 AM
Hey guys. I am a complete noob to html and had someone else do my website that is no longer available to help.
where and what do i need to do to make the four fields required to submit messages? and is there a way to possibly have a notification if they fail to enter all fields and add a addition captcha to this. i greatly appreciate anything y'all can do to help me

my coding looks like this

[code]
<tr>
<td>
<font face="calibri" color="#FFFFFF">
Your Name:
</font>
</td>
<td valign="top" rowspan="10">
<table>
<tr>
<td>
<font face="calibri" color="#FFFFFF">
Message:
</font>
</td>
</tr>
<tr>
<td>
<textarea rows="10" cols="30" name="message"></textarea>
</td>
</tr>
</table>
</td>
</tr>

<tr>
<td>
<input type="text" size ="30" name="name">
</td>
</tr>
<tr>
<td>
<font face="calibri" color="#FFFFFF">
Your E-Mail:
</font>
</td>
</tr>
<tr>
<td>
<input type="text" size ="30" name="email_address">
</td>
</tr>
<tr>
<td>
<font face="calibri" color="#FFFFFF">
Phone Number:
</font>
</td>
</tr>
<tr>
<td>
<input type="text" size ="30" name="subject">
</td>
</tr>
<tr>
<td colspan="10">
<input type="submit" name="send_message" value="Send Message!">
</form>
</td>
</tr>
</table>
</td>
<td valign="top">
<table>
<tr>
<td width="10">
</td>
<td>
<table>
<tr>
<td valign="top">
[code/]

Mahdi Eftekhari
Feb 22nd, 2012, 12:16 PM
You can enforce this using javascript to check if the fields are filled and if not display a custom message and prevent form from being submitted.

If you need more than just explanation then post the whole code for your form and we will help you further.

Also your code is out of shape, try to rewrite it so it meets today's standards.

Regards
Mahdi Eftekhari