I have setup V2 - checkbox style Google recaptcha for my client and I cannot get the form plugin to play nice with Google. Every time I test the form I get the following error back “reCAPTCHA bot protection has identified this form submission is problematic”.
Here is my contact form yaml.
title: Contact
cache_enabled: false
form:
name: contact-form
action: '/contact#contact'
fields:
name:
label: Name
placeholder: Name
type: text
autofocus: true
validate:
required: true
email:
label: Email
placeholder: Email
type: text
validate:
required: true
subject:
label: Subject
placeholder: Subject
type: text
validate:
required: true
message:
label: Message
placeholder: 'What''s on your mind?'
type: textarea
rows: 5
validate:
required: true
buttons:
submit:
type: submit
value: Send
process:
captcha: true
reset: true
email:
from: '{{ config.plugins.email.from }}'
to: '{{ config.plugins.email.to }}'
subject: 'langford-assoc.com: {{ form.value.name|e }} - {{ form.value.subject|e }}'
body: '{% include ''forms/data.html.twig'' %}'
save:
fileprefix: contact-
dateformat: Ymd-His-u
extension: txt
body: '{% include ''forms/data.txt.twig'' %}'
message: 'Thank you for getting in touch!'
I have already updated grav + form plugin to latest versions, and I have configured the form plugin with the correct site key and secret key.
It is work noting that I have also tried changing the form options from the above to the following with no success either.
captcha:
recaptcha_secret: 6Le...ldK
Does anyone have Google ReCaptcha V2 - Checkbox working with form plugin? I have tried googling this and am finding lots of conflicting information about how to use recaptcha with Grav forms.