Contact Form with Cloudflare Turnstile

1 reply · opened Mar 19, 2023

PpardthemonsterMar 19, 2023

I recognize this may be beyond the support, but I believe I was able to integrate the Cloudflare Turnstile recaptcha using the recaptcha v2 example (contact-recaptcha.html) through Cloudflare's migration guide (https://developers.cloudflare.com/turnstile/migration/migrating-from-recaptcha/), however the form returns an additional field (bolded below) in email that I would like to not include:

• Name
• Email
• Phone
• Message
Cf-Turnstile-Response

Is there any to exclude certain input names or classes in form email response? Like is it possible to not include certain inputted fields like Phone even though they contain information? Or exclude if type hidden? (trying to exclude Cf-Turnstile-Response)

SSemicolon WebSTAFFMar 19, 2023

Hello,

This is absolutely possible! Simply find the $unsets array in the include/form.php File and add cf-turnstile-response to the list.

This is how the code should look like:
[ch_pre type="php"]$unsets = array( 'prefix', 'subject', 'replyto', 'template', 'html_title', 'message', 'autoresponder', 'ar_subject', 'ar_title', 'ar_message', 'ar_footer', $prefix . 'botcheck', 'g-recaptcha-response', 'h-captcha-response', 'cf-turnstile-response', 'force_recaptcha', $prefix . 'submit' );[/ch_pre]

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard