Hi fellow modxers
I’ve just recently made the change from Evolution to Revolution and am having trouble getting FormIt to actually send email.
I’m sure this is a really newb question but I’d be very grateful for any help as I’ve been unable to find an answer.
Basically the form is set up and validating fine, but when I hit submit it just refreshes the existing page. Below is my code:
The contact form (template):
[[!FormIt?
&hooks=`email,redirect,spam`
&emailTpl=`sent_email_template`
&emailTo=`[email protected]`
&emailSubject=`Enquiry via website`
&redirectTo=`21`
&validate=`name:required,
email:email,
text:required`
]]
[[!+fi.error.error_message:notempty=`<p class="error">[[!+fi.error.error_message]]</p>`]]
<form action="[[~[[*id]]]]" method="post" id="contact-form">
<label for="name" >Name<span class="error">[[+fi.error.name]]</span></label>
<input type="text" name="name" maxlength="60" value="[[+fi.name]]" />
<label for="email" >Email<span class="error">[[+fi.error.email]]</span></label>
<input type="text" name="email" size="40" maxlength="40" value="[[+fi.email]]" />
<input type="hidden" name="phone" value="" />
<label for="text">Message<span class="error">[[+fi.error.text]]</span></label>
<textarea cols="40" rows="7" name="text" value="[[+fi.text]]">[[+fi.text]]</textarea>
<input type="image" name="submit" class="submit" alt="Send" src="assets/images/global/send.png" />
</form>
sent_email_template (chunk):
<br />[[+name]] ([[+email]]) Wrote: <br /> [[+text]]
Any idea if it’s something wrong with my code, or a setting in modx or the FormIt package I need to change?
Many thanks in advance for any help you can give me.
Harmony