forum avatar

prevent spam through contact form

By
Published 16th April 2011 |
Read latest comment - 27th December 2011

Hello all,
I have a contact form on my site and am receiving a lot of spam that I assume is done by bots just filling in the form and sending it to me. What's the easiest way for a non-techie to prevent non-humans from filling out the contact form?
Comments
Personally, I add a simple captha

If your unfamiliar with them, heres a good place to start
CAPTCHA - Wikipedia

Steve Richardson
Gaffer of My Local Services
My Local Services | Me on LinkedIn

Yes, CAPTCHA is the way to do it. What is your website based on (wordpress, custom coded etc?).

harvey

forum avatarceric
2nd June 2011 10:59 AM
I agree with them. You can use captcha to prevent spam on your email.

This is what We use when designing websites for clients. Use a normal text field(use type="text" NOT type="hidden") in the form and hide it through javascript or CSS. In the processing scripts, see if the field has been filled or not once the form is submitted. Spam bots tend to fill all input boxes in a form. So if you find the field not empty that must be a spam. I found the solution in the internet and that seemed to work 100% so far. Better than Captchas as captchas are not user friendly and bots now can even break captchas.

Hope that Helps.

Thanks,
fourth-monkey

forum avatarseo-bod
17th July 2011 10:40 AM
This is what We use when designing websites for clients. Use a normal text field(use type="text" NOT type="hidden") in the form and hide it through javascript or CSS. In the processing scripts, see if the field has been filled or not once the form is submitted. Spam bots tend to fill all input boxes in a form. So if you find the field not empty that must be a spam. I found the solution in the internet and that seemed to work 100% so far. Better than Captchas as captchas are not user friendly and bots now can even break captchas.

Hope that Helps.

Hi fourth monkey, could you point me to a working version of this? Or pm me some details?

Thanks in advance.

Hi fourth monkey, could you point me to a working version of this? Or pm me some details?

Thanks in advance.

I wrote a blog post to explain it in details. If still not clear, drop me a PM. Cheers.

Thanks,
fourth-monkey

forum avatarmysitemanager
25th July 2011 1:24 PM
I usually use recaptcha but they're getting harder to read for humans so I'm thinking of ditching it for a simple solution like fourth monkey outlined. I read somewhere you could record the time the contact page loaded and compare it to the time the page was submitted and if it's less than 5 seconds (or whatever you set the threshold to) then it must be a spam bot as the form couldn't be filled out in less than 5 seconds by a human.

The logic captchas are much more user-friendly.

I've often wondered whether some of the visual ones might infringe disability discrimination legislation.

Linda
CareersPartnershipUK

Some of them are really hard work, especially from some of the big boys. Number of times I have to refresh to a new word because you can't work it out!

We have quite simple captcha's on our directory which are very human friendly, and although not sophisticated, they (touch wood) have done the job so far, and kept the bots and scripts at bay.

Steve Richardson
Gaffer of My Local Services
My Local Services | Me on LinkedIn

This Thread is now closed for comments