-
-
Notifications
You must be signed in to change notification settings - Fork 695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please incorporate Google reCAPTCHA with the formspree form and ajax/js validation. #19
Comments
This is definitely doable. Would you like to submit a PR? If not I can add this to the todo list. |
Thanks for the reply. I totally forgot that I meant to first thank you for the awesome template and for sharing it! I've been using it for awhile. My skills in the area are definitely lacking, especially when it comes to javascript (love to learn more, but current life responsibilities don't leave me enough time.) What that means, is that I do not have a PR to submit, because I cannot completely wrap my head around it (so far). I was taking some stabs at it in a few spare moments, piecing together some bits and pieces I could find around the web, but I didn't get it to a working state yet. And I'm sure it would be lacking! :) |
Thank you! Got it haha the best way to learn is by doing! I'll add this to the to-do list. |
Hi @raviriley. After some quick research, I've figured out that Google reCAPTCHA requires a backend to validate the response without exposing the secret key. This can be implemented for:
Can I proceed with adding this feature knowing that it will only be available to the websites mentioned above? |
Hey @avicndugu, what's your plan to proceed? I've kept this issue open in case someone finds a way to do something similar but works on a static site (without Google reCAPTCHA) as I assume most people deploying this sort of Jekyll site don't have a backend to connect. Would love to hear your thoughts |
Thanks for the quick reply. I now have a better understanding of the constraints. I'll do some research on possible solutions that don't require a backend or functions and get back to you. |
My ThoughtFor a static website, the idea would be to eliminate the simplest bots which just fill information and then move on. That way anyone trying to spam the site has to waste time programming a bot to overcome the challenge. I found 3 main solutions:
At first, option 1 looked promising. However, autocomplete might fill the hidden form which would result in legitimate users who are unable to submit the form. I'm more inclined to go with option 2 or 3 which are visible to the human users. Option 2 and 3 would utilize a JavaScript script so no backend required. Quick links |
@avicndugu I think honeypot is likely the way to go here, as we can specify no autocomplete in the input tag attributes. This would also require JavaScript to validate the form. A hidden input has the added benefit of being invisible to the user, keeping the current design the same. |
@raviriley You have presented a strong case for the honeypot method. I'll go ahead and implement this method. If there are any issues I'll let you know. |
Is your feature request related to a problem? Please describe.
Would like to incorporate Google reCAPTCHA with the formspree form
Describe the solution you'd like
Would like to continue to use the ajax for validation and submission along with reCAPTCHA
Describe alternatives you've considered
It works well without the form validation and just the formspree option, but it is preferred to use the ajax as you've done it.
Additional context
I would personally would like to use it with the 'invisible" option. https://developers.google.com/recaptcha/docs/invisible
The text was updated successfully, but these errors were encountered: