Hi all,
This is a bit of a strange one and if anyone can point me in the right direction that would be great. I've re-checked and re-checked my code and call but seem to having a bit of a problem with FormIt and &validate call. This is my call:
[[!FormIt? &hooks=`spam,email,redirect` &emailTpl=`emailResponse` &emailTo=`[email protected]` &redirectTo=`30` &validate=`name:required,email:email:required` ]] [[+fi.error.error_message]]
The form is very simple:
<form id="EmailForm" action="[[~[[*id]]]]" method="post">
<input type="hidden" name="nospam:blank" />
<label for="Name">First name:[[!+fi.error.name]]</label> <input id="name" type="text" name="name" value="[[!+fi.name]]" />
<label for="Surname">Surname:[[+!fi.error.surname]]</label><input id="surname" type="text" name="surname" value="[[!+fi.surname]]" />
<label for="Company">Company:</label> <input id="company" type="text" name="company" value=""/>
<label for="Country">Country:[[!+fi.error.country]]</label> <input id="country" type="text" name="country" value="[[+!fi.country]]" />
<label for="Email">Email Address:[[!+fi.error.email]]</label> <input id="email" type="text" name="email" value="[[!+fi.email]]" />
<div id="text"><label for="Message">Message: [[!+fi.error.message]]</label> <textarea id="message" name="message" rows="7" cols="55">[[!+fi.message]]</textarea></div>
<br class="clear" />
<input id="enquire" type="submit" value="Send Enquiry" />
</form>
The form works and sends, however, I want to add validation to other fields as can be seen - I want to include surname, country and message but as soon as I add these to &valdidate the form and page disappear on the front end.
I've tried adding &submitVar=`1` but that doesn't work either.
I'm using FormIt 2.0.2 and Rev 2.1.5 - have I made some silly typo because I can't see for looking now
Not experienced this problem before when using 2.1.3.
Or is this a bug....?