ldeso/hugo-flex

Support Netlify forms spam prevention

evrardjp opened this issue · 4 comments

Hello,

Do you think it would be nice to add a netlify: hash for the theme configuration, inside which there could be booleans to flip the reCAPTCHA/honeypot fields on/off in the netlify partial template?

See also:
https://docs.netlify.com/forms/spam-filters/#extra-spam-prevention

ldeso commented

Hello,

I have added the possibility to enable a honeypot field and/or a recaptcha challenge on the contact form; unfortunately, when I enable the recaptcha challenge on my website, it won't display in the form and it will block all submissions. I don't understand why, because when I look at the HTML code it seems to contain the script from Google.

Does the recaptcha challenge work on your website? If not, I guess I will have to ask for help on the Netlify forums.

I didn't try recaptcha, I only used the honeypot field. I can check that when I am back from a business trip, but it will take 2 weeks. Sorry for the delay.

ldeso commented

Okay, thank you very much and no worries.

ldeso commented

I finally checked it and it works well :-) If the website uses a strict Content-Security-Policy, ReCaptcha has to be allowed to load properly.