tm2000
February 15, 2024, 9:45am
1
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.
Akismet is an advanced spam protection service to analyse form submissions, and block spam across the internet. Our package provides hooks to use it to block spam in FormIt, Register, and Quip forms.
There’s also Cloudflare’s Turnstile if you end up going down the captcha route: Turnstile 0.0.2-pl | MODX
tm2000
February 15, 2024, 11:34am
3
OK thanks - I will take a look at that.
I used Cleantalk on a site and it worked well.
tm2000
February 15, 2024, 10:17pm
6
Interesting! Never heard of that one. Thank you!
Nice! CleanTalk pricing looks very reasonable
tm2000
February 16, 2024, 9:32am
8
I’ve installed this - From the docs I don’t need a hook for formit? is that correct?
tm2000
February 16, 2024, 9:43am
9
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
bobray
February 16, 2024, 11:28pm
11
There is also SPForm, which is infinitely more spamproof than FormIt.
Akismet is also excellent for non-contact-form use.
system
Closed
February 18, 2024, 11:28pm
12
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”.