FormIt not sending

Hi all,

I’ve not used FormIt before and wanted to set it up. I’ve installed the plugin and am following the example on the RTFM.

For now I’ve removed validation and recaptcha, but it’s still not working. The form renders but nothing gets sent. No error messages either.

My snippet and chunk calls are as such:



My form is:


<form action="[[~[[*id]]]]" method="post" class="form">
    <input type="hidden" name="nospam" value="" /> 
    <label for="name">
        <span class="error">[[!]]</span>
    <input type="text" name="name" id="name" value="[[!]]" />
    <label for="email">
        <span class="error">[[!]]</span>
    <input type="text" name="email" id="email" value="[[!]]" /> 
    <label for="subject">
        <span class="error">[[!+fi.error.subject]]</span>
    <input type="text" name="subject" id="subject" value="[[!+fi.subject]]" />
    <label for="text">
        <span class="error">[[!+fi.error.text]]</span>
    <textarea name="text" id="text" cols="55" rows="7" value="[[!+fi.text]]">[[!+fi.text]] . 

My EmailTpl is simply:

<br />[[+name]] ([[+email]]) Wrote: <br /> 

Would anyone know what I am doing wrong?

1 Like

Just to be sure: FormIt is installed?

Hi @meltingdog

Formit deppends on the e-mnail settings defined on Modx settings.
Did you check the e-mail settings in order to ensure that you defined a smtp server, username, password, outgoing port and SSL (if needed)?
If you go to the Formit menu and check your saved submissions, is it listed there?

Then here is an example of mine so you can guide through.

Form having formit tags:

	&formName=`Footer Contact Form`
	&successMessage=`<script>window.alert("Your contact was sent successfully");destroyScreenDimmer();</script>`
    &validationErrorMessage=`<script>window.alert("Validation errors were found. Please try again");destroyScreenDimmer();</script>`
    &fiarSubject=`Your message was sent successfully`
    &fiarFromName=`Your Website Name - Auto-Mailer`

[[!+fi.validation_error_message:notempty=`[[!+fi.validation_error_message]] ([[+errors]])`]]
<form action="[[~[[*id]]]]#footerForm" method="post" class="form" name="contact_form" id="contact_form" autocomplete="false" enctype="application/x-www-form-urlencoded" role="form" data-toggle="validator">

	<input type="text" name="contact_email" id="contact_email" placeholder="E-Mail" 
		required="required" class="newsletter-input blue-color d-block w-100 px-3 py-2 mb-2"/>

	<select name="subject" id="subject" required="required" class="newsletter-input d-block w-100 px-3 py-2 mb-2 blue-color">
	  <option value="" disabled selected>-- Choose an option --</option>
	  <option value="Suggestions">Suggestions</option>
	  <option value="Question">Question</option>
	  <option value="Information request">Information request</option>
	  <option value="Change/Improvement">Change/Improvement</option>
	  <option value="Malfunction">Malfunction</option>
	<textarea name="contact_message" id="contact_message" rows="3" cols="30" placeholder="Message"
		required="required" class="newsletter-input blue-color d-block w-100 px-3 py-2 mb-2"></textarea>

	<div class="d-block text-right pt-1">
		<input type="submit" class="button-simple button-blue text-center text-white text-uppercase font-weight-bold px-5 py-2" value="Send" name="BottomSend" form="contact_form" onclick="javascript:activateScreenDimmer()" />			

Then the footerEmailTemplate.tpl will be the e-mail template sent to you having all details, and the footerEmailAutoResponder.tpl will have the HTML of the e-mail sent to your customer informing that the contact was received.

Here is an example of footerEmailTemplate.tpl:

							<td valign="top" align="left" colspan="2">
								<br /><br />
								<b>E-Mail: </b>[[+contact_email]]<br />
								<b>Subject: </b>[[+subject]]<br />
								<hr />
								<b>Message: </b><br /><pre>[[+contact_message]]</pre><br/><br/><hr />

If the receiver of this e-mail replies, it will reply to your mailbox as defined above.
Same applies to the footerEmailAutoResponder.tpl

							<td valign="top" align="left" colspan="2">
								This is the information that you sent:<br /><br />
								<b>E-Mail: </b>[[+contact_email]]<br />
								<b>Subject: </b>[[+subject]]<br />
								<hr />
								<b>Mensage: </b><br /><pre>[[+contact_message]]</pre><br/><br/><hr />

Hope it helps somwhow.

Please ping us again if you need more help :wink:

1 Like

I’d start by installing QuickEmail and adding the following to a resource to see if email sending is configured properly:

[[!QuickEmail? &debug=`1`]]

If sending email doesn’t work, the email hook fails, and processing stops there.

1 Like

Check your SMTP settings… I had same issue. SMTP was not set correctly.

Try QuickEmail, if it sends try to remove a parameter and test again till it works. Also try the minimum call on the website:


Sorry for the late reply - Yes it is.