Hello,
I’m creating a contact form using the documentation.
However, the captcha isn’t working (not showing).
The console outputs this error:
Error: Missing required parameters in RecaptchaOptions: sitekey
However, my recaptcha_site_key is defined.
Without the captcha, the form works perfectly fine.
Here’s the full (edited) contact page’s frontmatter:
title: 'Nous contacter'
visible: true
in_nav: true
coord: "Company address"
form:
action: /contact
name: contact
fields:
YAMLname: name label: 'Votre nom complet' placeholder: 'Nom complet' type: text autofocus: 'on' validate: required: true YAMLname: company label: 'Votre société' placeholder: Société type: text YAMLname: email label: 'Votre adresse e-mail' placeholder: E-mail type: email validate: rule: email required: true YAMLname: phone label: 'Votre numéro de téléphone' placeholder: Téléphone type: text YAMLname: message label: 'Votre message' placeholder: Message type: textarea validate: required: true YAMLname: g-recaptcha-response label: Validation type: captcha recaptcha_site_key: I-WROTE-THE-KEY-HERE recaptcha_not_validated: 'Validation incorrecte.' validate: required: truebuttons:
YAMLtype: submit value: Envoyerprocess:
YAMLcaptcha: recaptcha_secret: I-WROTE-THE-OTHER-KEY-HERE-
email:
from: '{{ form.value.email }}'
from_name: '{{ form.value.name|e }}'
to: '{{ config.plugins.email.to }}'
subject: '[Site] Message de {{ form.value.name|e }},{% if form.value.company %} ({{form.value.company|e }}){% endif %}'
body: '{% include ''forms/data.html.twig'' %}'TWIGsave: fileprefix: contact- dateformat: Ymd-His-u extension: txt body: '{% include ''forms/data.txt.twig'' %}'-
message: hop!TXTdisplay: ok
Can someone see what’s wrong?
Thanks!