Hello,
I copied paste a formit example from documention in order to test the validation. However no error message appears and the form is submitted even when the “name” field is empty…
Any help would be greatly appreciated. The formit version is the 4.2.7-pl
[[!FormIt?
&hooks=`email,redirect`
&emailTpl=`MyEmailTest`
&emailTo=`[email protected]`
&emailFrom=`[email protected]`
&validate=`name:required`
&redirectTo=`18`
]]
<h2>Contact Form</h2>
[[!+fi.validation_error_message:notempty=`<p>[[!+fi.validation_error_message]]</p>`]]
<form action="[[~[[*id]]]]" method="post" class="form">
<label for="name">
Name:
<span class="error">[[!+fi.error.name]]</span>
</label>
<input type="text" name="name" id="name" value="[[!+fi.name]]" />
<div class="form-buttons">
<input type="submit" value="Send Contact Inquiry" />
</div>
</form>