I’m trying to add a form to a website. To learn about forms step by step, I created a simple empty website, and try to follow instructions in the docs.
The form is working, but I tried to add a basic-captcha and somehow it doesn’t show properly.
Don’t know where the problem is, but I wouldn’t bother trying to figure out. Basic captcha is pretty much useless these days. Any decent bot can bypass it.
@Karmalakas, I was looking for some simple captcha protection for a form, that would not be provided by google or any other big provider, something that can be self-hosted, that’s why I thought “Great!” when I saw grav provided that out-of-the-box. But if it’s outdated now for today’s bots, I wonder what to do. Do you know of some alternative that would be good for today’s bots and easy to implement in grav?
Hard to answer with the little information you’ve provided. If you haven’t changed anything to the fresh install of Grav, I have no clue.
Try the Honeypot field if you don’t want to use big providers. It creates a hidden field which is only visible to javascript bots (the honeypot). When the hidden honeypot field has a value, the bear has been caught in the act and Grav will reject the submitted data.
Yes I understand, I didn’t know what other info to provide because it’s really a basic install without any modification apart from creating that test form page. I also had no clue what could be going on and that’s why I wrote this post.
At this point I start wondering if something in the way it’s installed could be the cause of that, even if I really don’t see why/what. I installed it through yunohost which uses [this install script](grav_ynh/scripts/install at master · YunoHost-Apps/grav_ynh · GitHub). At some point I thought it could be a permission issue for the access to the image, but somehow it did not make too much sense because the captcha image is generated programmatically. And all dirs and files permissions seem normal: `gravuser:www-data`. Also, the site is behind a login page, which yunohost handles, so I wonder if that could have an impact, but really don’t see why.
Well I don’t know, it’s strange.
Thanks for this suggestion! I’d never heard of this technique. It’s seems like a sweet solution (it really is, as a honeypot ;)) as as I understand it doesn’t even requests a user interaction, so it’s even more convenient than a captcha.
I’ll try it out.
Do you (or anyone else) have returns of experience using it? and about how well it works against bots?
I have no experience with the build-in Honeypot field since I use custom build Contact and Comment forms without using the Form plugin. I’ve build in three traps which are handled in the following order:
A honeypot field with the very common name “Message”, which a bot cannot resist.
The latest version of Google’s reCaptcha, which does not require interaction.
Common field value checks eg. correct phone number.
I’ve been using reCaptcha v2 (never managed to make v3 work on XHR requests) and still getting spam maybe once a day. Since I also added honeypot ~ a year or two ago, I don’t think I’ve gotten even a single spam mail
Thanks a lot @pamtbaau and @Karmalakas for the returns on experience, I’ll try with the honeypot field and then see if it’s useful to add something more.
@pamtbaau you say you check phone number, may I ask how you perform that check? What ways are there to know that a phone number is valid, apart from sending SMS to people for verification?
A “correct phone number” does not equal “existing phone number”…
I check the format of the phone number.
When using the Form plugin, you could use field validation using regex to check the format of the phone number. You can restrict the format to the format used in your country.
There also is a Tel field, but that field does not add any formatting checks. However, when a mobile user uses the form, the virtual keypad will only show numbers.
Hey sorry, yes I have had little time to continue developing the site these days, just tested the solution you mentioned and it seem to work great (without test against bots so far).
Just marked the post as solved. I modified the title of the thread because in reality the first issue I had brought up I still could not solve, but you mentioned better solutions.