My form is not honoring the required
attribute of the "comments" field. I want it so that when the user submits the form, it shows "please fill the field", but instead the user can submit the form straight away.
<form class="form-part" method="post" action="contact_form.php" name="contactform" id="contactform" onSubmit="return checkForm1();">
<input id="name" type="text" name="name" size="30" title="Name" required>
<input id="email" type="text" name="email" size="30" title="Email" required>
<textarea rows="3" id="comments" name="comments" cols="40" title="Tell us what you think!" required></textarea>
<input type="submit" name="Submit" alt="Send">
</form>
A very simple check function might be:
For this to work you need to augment your form tag to: