Contact Form button - possible to automatically include reCAPTCHA v3

5 replies · opened Jul 21, 2020

CClareOkiJul 21, 2020

Hi there,
I can see code on the reCAPTCHA webpage (v3) that suggests I can 'Automatically bind the challenge to a button' - is that possible with the Canvas theme contact form button? And if it is possible, how do I do it?
Currently I'm using the form widget, and the template contact form. It's a simple form with name, email address and message area with a submit button.
Many thanks!

SSemicolon WebSTAFFJul 22, 2020

Hello,

This is currently not supported with Canvas Forms as the Canvas Forms run on AJAX. But we already have a Template: contact-recaptcha-v3.html included in the Package which has the Codes included for reCaptcha v3. So simply adding your Site Key and Secret Key will work fine. However, if you would like to use the "Automatically bind the challenge to a button" Option, you will need to disable the AJAX Forms by removing the .form-widget Class. Then you can simply follow the default instructions provided by reCaptcha Website.

Hope this Helps!

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

CClareOkiJul 23, 2020

Thank you, this does help. I'll use the template you mention, and won't try to bind it to the button.

Just one more question - on the template it looks as though the reCAPTCHA execute might be linked to page-load which could be problematic as it expires after 2m. Can I link it instead to Submit? And if so, how do I do this in the code on the template?

Many thanks

SSemicolon WebSTAFFJul 23, 2020

Hello,

We already have codes integrated within the Template which refreshes the reCaptcha if expired or not submitted correctly. You can try this Template out and let us know if you face any further issues.

Hope this Helps!

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

CClareOkiJul 23, 2020

Great. Thanks so much for quick and helpful responses.

SSemicolon WebSTAFFJul 23, 2020

Hello,

Very Happy to Help!

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

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