Skip to content
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

Contact form with Cloudflare Turnstile #43

Open
zbigniew73 opened this issue Feb 15, 2023 · 1 comment
Open

Contact form with Cloudflare Turnstile #43

zbigniew73 opened this issue Feb 15, 2023 · 1 comment

Comments

@zbigniew73
Copy link

Hello,
how the integration of the contact form with Cloudflare Turnstile Captcha should look like.
I have site key + secret key.
I added in plugin form.
What to add in the code?
Thank you in advance for your help.

@pmoreno-rodriguez
Copy link
Collaborator

Hi @zbigniew73.
You don't have to do anything in the template, but in the .md file of your modular contact page. Here is the example code of the demo page (I put only the code of the 'process' block):

process:
-
email:
from: '{{ config.plugins.email.from }}'
to:
- '{{ config.plugins.email.from }}'
- '{{ form.value.email }}'
subject: '[Feedback] {{ form.value.name|e }}'
body: "{% include 'forms/data.html.twig' %}"
-
save:
fileprefix: feedback-
dateformat: Ymd-His-u
extension: txt
body: "{% include 'forms/data.txt.twig' %}"
-
message: 'Thank you for your feedback!'
-
display: thankyou

Here you should follow the instructions in the example from the Grav documentation (https://learn.getgrav.org/17/forms/forms/fields-available#example) and add turnstile: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants