<div> [[!FormIt? &hooks=`email` &emailTpl=`form_email` &emailTo=`[email protected]` &emailSubject=`WEBSITE ENQUIRY` &successMessage=`<div class="alert alert-success"> <button type="button" class="close" data-dismiss="alert">×</button> <p class="lead">Thank you. Your enquiry has been sent.</p> </div>` &validate=`name:required, your_email:email:required, phone:required, comment:required:stripTags, confirm_email:blank, privacy:required` ]] [[!+fi.successMessage]] <form role="form" action="[[~[[*id]]]]" method="post"> <div id="name" class="form-group"> <label for="name">Your name: [[!+fi.error.name:notempty=`<p class="text-danger">This is a required field.</p>`]]</label> <input type="text" name="name" class="form-control" value="[[!+fi.name]]"> </div> <div id="your_email" class="form-group"> <label for="your_email">Your email: [[!+fi.error.your_email:notempty=`<p class="text-danger">This is a required field.</p>`]]</label> <input type="your_email" name="your_email" class="form-control" value="[[!+fi.your_email]]"> </div> <div id="confirm_email" class="form-group"> <input type="hidden" name="confirm_email" value="" />[[!+fi.error.confirm_email=`<p class="text-danger">Do not fill this field if you are human.</p>`]] </div> <div id="phone" class="form-group"> <label for="phone">Your telephone number: [[!+fi.error.phone:notempty=`<p class="text-danger">This is a required field.</p>`]]</label> <input type="text" name="phone" class="form-control" value="[[!+fi.phone]]"> </div> <div id="company" class="form-group"> <label for="company">Company name: [[!+fi.error.company:notempty=`<p class="text-danger">This is a required field.</p>`]]</label> <input type="text" name="company" class="form-control" value="[[!+fi.company]]"> </div> <div id="comment" class="form-group"> <label for="enquiry">Your enquiry: [[!+fi.error.comment:notempty=`<p class="text-danger">This is a required field.</p>`]]</label> <textarea name="comment" class="form-control" rows="8" value="[[!+fi.comment]]"></textarea> </div> <div class="checkbox"> <label> [[!+fi.error.privacy:notempty=`<p class="text-danger">Please tick to confirm your agreement to our privacy policy and terms & conditions.</p>`]] <input type="hidden" name="privacy" value="" /> <input type="checkbox" name="privacy" value="agree" [[!+fi.privacy:FormItIsChecked=`agree`]] > Please tick this box to indicate that you understand and agree to our <a href="[[~34]]" title=" Privacy Policy" target="_blank">privacy policy</a> and <a href="[[~19]]" title=" Terms & Conditions" target="_blank">terms & conditions</a>. </label> </div> <div class="form-group"> <button type="submit" class="btn btn-default" value="Submit">Submit enquiry</button> </div> </form> </div>
<p>Name: [[+name]]</p> <p>Email: [[+your_email]]</p> <p>Phone: [[+phone]]</p> <p>Company: [[+company]]</p> <p>Enquiry: [[+comment]]</p>
This question has been answered by alanstr84d. See the first response.
Did you re-format the snippet tag?
FormIt is sometimes fussy about multi-line arguments. Try putting the validate property all on one line.
There's an issue in another thread where some of the properties in the tag are getting sent to the snippet with the back-ticks included, so FormIt is looking for a hook called `email` instead of email, and not finding it. See if you have anything related to FormIt in the error log when you try to send email.