Page 1 of 1

Honeypot captcha with form builder

Posted: Sat Oct 01, 2011 4:03 pm
by rubberglover
Is it possible to create a simple honeypot captcha using form builder? If not it'd make nice a addition to the field type drop down menu!

I want to make a text field that is hidden by CSS, but is validated as an empty field. That way a valid human user will leave it blank (as they can't even see it) and it will validate.

I've tried making a text input field, choosing 'match regular expression' as the field validation, then entering

Code: Select all

^$
as the validation regex so that it looks for an empty string... problem is it only runs the validation if you check 'require a response from this field' and so it's checking to make sure the field is NOT empty, and then immediately checking to make sure it IS empty, which obviously doesn't work!

Any ideas?

Re: Honeypot captcha with form builder

Posted: Sat Dec 28, 2013 4:37 pm
by boonier
Hi, did this ever get solved? or did anyone successfully do this?

I'd like to implement this on my site as it's getting attacked with spam recently. Also, would I have to hack the module php to check the field before the form is posted? Maybe I've had too many xmas sherries but I can't see a way to do this within the smarty from the template.

cheers

Re: Honeypot captcha with form builder

Posted: Sat Dec 28, 2013 4:46 pm
by calguy1000
It's not hard to do with a simple UDT, and a custom form template.

a: give a text field a class/alias
b: modify the form template to ensure that the container that has that class is hidden.
c: create a simple UDT (this will take a bit of back and forth)
the UDT should look in it's $params array... it'll have (on form submission) a list
of all of the fields and their submitted values.
d: add the UDT as a disposition for your formbuilder form.

Re: Honeypot captcha with form builder

Posted: Sat Dec 28, 2013 4:51 pm
by Rolf
Velden added the feature to this blog post
https://www.cmscanbesimple.org/blog/for ... modal-view

Re: Honeypot captcha with form builder

Posted: Sat Dec 28, 2013 6:02 pm
by boonier
Thanks for the explanations guys. Will investigate!

S