I am confident that FormIt is an awesome add-on. So far I've built a form using Foundation 5 classes and inserted various FormIt aspects and my form gets successfully emailed to me. So far so good. Problem is, if the required fields are not filled out, the form doesn't get emailed and there are no error messages. The page just reloads with an empty form. Not so good. Basically and incomplete form must be getting mailed off into the abyss. I'm hoping someone familiar with it can take a look. I'm hoping to be able to use the foundation 5 error classes, but at a bare minimum I need errors to appear in some fashion and not have the form get lost. Actually—maybe the form isn't getting lost, it's just reloading the page, but no info is provided to the user. I'm sure this will get easier, but I could really use some tips at the moment.
Here is my current FormIt snippet:
[[!FormIt?
&hooks=`spam,email,redirect`
&emailTpl=`ResLSNWChunk`
&emailTo=`
[email protected]`
&emailSubject=`Reservation from [[+firstName]] [[+lastName]]`
&redirectTo=`35`
&validate=`firstName:required,
lastName:required,
officeCommon:required,
officeLegal:required,
email:email:required,
phone:required,
text:stripTags`
]][[!+fi.error_message:notempty=`<p>[[!+fi.error_message]]</p>`]]
Here a portion of my form for which I want these fields to be required:
<div class="row">
<div class="large-6 columns">
<label>First Name*
<input type="text" name="firstName" id="firstName" placeholder="First Name" [[!+fi.firstName]]/>
</label>
</div>
<div class="large-6 columns">
<label>Last Name*
<input type="text" name="lastName" id="lastName" placeholder="Last Name" [[!+fi.lastName]]/>
</label>
</div>
</div>