FormIt sends copy of contact form to sender but nothing to emailTo address

Hi! I have a curious issue. I have created a new FormItcontact form on a website, with the code being an exact replica of code I am using on another site without issue, incl. the tpl chunk.

However, on this new site, the form will send an email copy to the customer completing the form, but will not send it to the address under emailTo. Also, when clicking the submit button, the success message doesn’t show. There is also no record of the form having been sent in the Manager FormIT list.

Has anybody come across this before? It’s a new one to me.

Thanks for any suggestions!

<div class="row">
				<div class="col-12 col-sm-10 offset-sm-1 col-md-8 offset-md-2 text-center">
                       &emailSubject=`Message from contact form`
                    <!-- Contact Form -->
					<div class="contact-form">
						<form action="[[~[[*id]]]]" method="post" id="contactform">
							<div class="form-row">
								<div class="col-12 col-sm-6">
									<input type="text" id="name" name="name" placeholder="Name" value="[[!]]" required>
								<div class="col-12 col-sm-6">
									<input type="email" id="email" name="email" placeholder="E-Mail" value="[[!]]" required>
							<input type="text" id="subject" name="subject" placeholder="Subject" value="[[!+fi.subject]]" required>
							<textarea name="message" id="message" placeholder="Message" value="[[!+fi.message]]">[[!+fi.message]]</textarea>
							<br class="clear" />
                            <br class="clear" />
							<button class="button button-lg button-rounded button-outline-dark-2" type="submit">Send Message</button>
						<!-- Submit result -->
						<div class="submit-result">
							<span id="success" style="display:block;">Thank you! Your Message has been sent.</span>
							<span id="error">Something went wrong, Please try again!</span>
					</div><!-- end contact-form -->                   
			</div><!-- end row -->

Hi @intandem,

from the list of your hooks, I do not see which one could send email to customer, usually, this can be done through FormItAutoResponder snippet.

That is, it seems that such submission should not be :slight_smile: … is your form intercepted by someone else, for example, another Formit snippet on the same page or some kind of other snippet / plugin?

Also as far as I remember spam hook doesn’t work properly, you may remove it from &hooks list.

Please additionally confirm you have proper email value in emailsender System setting.

Have you checked the MODX error log?

It wont help with sending emails, but I’d suggest making the FormItSaveForm snippet the first hook after spam checks, e.g. spam,FormItSaveForm,email. That way you’ll at least save a copy of the form to the database should a later hook fail for whatever reason.

Other things worth checking:

  • Any other forms on the same page that may be getting processed instead of the form you’ve shared? As @himurovich mentions, the form you posted doesn’t have the autoresponder hook, so perhaps a different form that does have that is processing the submit? With multiple forms on the page, always assign them a unique &submitVar with a matching hidden input field.
  • Do you have MODX configured to send emails via SMTP? If not, I’d strongly recommend that to greatly improve the odds of an email being accepted by the server.

Thank you both very much! Yes, I had used a HTML template to turn this around quickly for a friend and the ID of the form kicked off the template’s own scripts to send the form. So FormIt never got to run at all. Resolved now and working beautifully. Cheers!