Hi Guys,
I’m having trouble getting a contact form to run using formit.
I have setup the standard form from this link: link
When i submit a form on the contact page, it just refreshes the page and show the form with no feedback or redirect.
I’ve tried stripping validation, spam and recaptcha out of the form but still can’t get anywhere.
I was thinking maybe formit could be installed in the wrong directory on the server based on the config files as this has been a problem in the past but other extensions work just fine.
I’ve setup G suite smtp relay in modx settings and it works when i test it with Quick Mail.
Any ideas?
Please see the code below:
[[!FormIt?
&hooks=email,redirect
&emailTpl=MyEmailChunk
&emailTo=neil@verdespaces.co.uk
&redirectTo=1
]]
Contact Form
[[!+fi.validation_error_message:notempty=<p>[[!+fi.validation_error_message]]</p>
]]
<label for="name">
Name:
<span class="error">[[!+fi.error.name]]</span>
</label>
<input type="text" name="name" id="name" value="[[!+fi.name]]" />
<label for="email">
Email:
<span class="error">[[!+fi.error.email]]</span>
</label>
<input type="text" name="email" id="email" value="[[!+fi.email]]" />
<label for="subject">
Subject:
<span class="error">[[!+fi.error.subject]]</span>
</label>
<input type="text" name="subject" id="subject" value="[[!+fi.subject]]" />
<label for="text">
Message:
<span class="error">[[!+fi.error.text]]</span>
</label>
<textarea name="text" id="text" cols="55" rows="7" value="[[!+fi.text]]">[[!+fi.text]]</textarea>
<label>
Numbers:[[+fi.error.numbers]]
<select name="numbers" value="[[!+fi.numbers]]">
<option value="">Select an option...</option>
<option value="one" [[!+fi.numbers:FormItIsSelected=`one`]]>One</option>
<option value="two" [[!+fi.numbers:FormItIsSelected=`two`]]>Two</option>
<option value="three" [[!+fi.numbers:FormItIsSelected=`three`]]>Three</option>
</select>
</label>
<label>
Colors:[[!+fi.error.colors]]
<input type="hidden" name="colors[]" value="" />
</label>
<ul>
<li>
<label><input type="checkbox" name="colors[]" value="red" [[!+fi.colors:FormItIsChecked=`red`]] /> Red</label>
</li>
<li>
<label><input type="checkbox" name="colors[]" value="blue" [[!+fi.colors:FormItIsChecked=`blue`]] /> Blue</label>
</li>
<li>
<label><input type="checkbox" name="colors[]" value="green" [[!+fi.colors:FormItIsChecked=`green`]] /> Green</label>
</li>
</ul>
<br class="clear" />
<br class="clear" />
<div class="form-buttons">
<input type="submit" value="Send Contact Inquiry" />
</div>
MyEmailchunk:
This is the Formit Email Chunk.
[[+name]] ([[+email]]) Wrote:
[[+text]]