Formit form being spammed

Hi - so i woke up to one of my forms being spammed. I was getting emails every two seconds until i removed the form - but I have the ‘spam’ hook installed - I prefer not to go down the recaptcha route, but is there no other way to prevent this?

Code is as follows in case I’ve missed something:

[[!FormIt?
&hooks=`spam,FormItSaveForm,email,redirect`
&submitVar=`callback`
&redirectTo=`170`
&emailTpl=`emailCallbackTpl`
&emailFrom=`noreply@tyga.co.uk`
&emailSubject=`Someone wants a callback regarding [[*pagetitle:striptags]]`
&emailTo=`email@domain.com` &emailCC=`email2@domain.com`
&mailCC=`email@domain.com`
&validate=`nospam:blank, name:required, company:required` ]]
		    
[[!+fi.validation_error_message:notempty=`<p id="message">[[!+fi.validation_error_message]]</

<form class=" form2022" action="[[~[[*id]]]]" method="post">
<input name="nospam" type="hidden" value="" />
<input name="title" type="hidden" value="[[*pagetitle]]" />
<div>[[!+fi.error.name]] <label for="name">Name*</label> <input name="name" type="text" value="[[+fi.name]]" /></div>
<div>[[!+fi.error.company]] <label for="company">Company*</label> <input name="company" type="text" value="[[+fi.company]]" /></div>
<div><label for="phone">Phone number</label> <input name="phone" type="text" value="[[+fi.phone]]" /></div>
<div class="wideField"><label for="comments">Any comments or messages for our team:</label> <textarea name="comments"></textarea></div>
<input name="callback" type="submit" value="Request Call back" />
</form>

I don’t think the spam hook is very effective anymore unfortunately.

Best solution I’ve used is Akismet. It uses AI to determine if it’s spam behind the scenes, rather than force a captcha.

There’s also Cloudflare’s Turnstile if you end up going down the captcha route: Turnstile 0.0.2-pl | MODX

OK thanks - I will take a look at that.

Take also a look here :wink:

1 Like

I used Cleantalk on a site and it worked well.

Interesting! Never heard of that one. Thank you!

Nice! CleanTalk pricing looks very reasonable :+1:

I’ve installed this - From the docs I don’t need a hook for formit? is that correct?

Ah it just ‘works’ - awesome!

Thats correct. The Plugin fires automaticly on OnLoadWebDocument/OnModxInit. So you dont need anything to do on FormIt.

1 Like

There is also SPForm, which is infinitely more spamproof than FormIt.

Akismet is also excellent for non-contact-form use.

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.