Captcha

Integrates Googles reCAPTCHA into October.

Back to Captcha Support

mittul
mittul

I have created a custom contact form with an ability to send emails.

Everything working fine as I am able to do validations as well as emails getting sent using SMTP.

The thing is, now I want to add captcha (Google Captcha) into my custom form, hence I have used Alxy Captcha plugin, installed it and followed the things which mentioned in their document.

I have also created their respective keys and I am able to see captcha if I run my URL in browser.

But I am unable to handle captcha server validations into it. How can I do this ?

If I click without filling recaptcha, I am getting error saying

["missing-input-response"]

If I fill recaptcha, it works fine as I am able to send emails like before.

Here below are my screenshots what I have done so far in my code for better idea.

1) My Contact Form Partial (Snippet):

enter image description here

2) My Contact Form Static Page (Backend):

enter image description here

3) Contact Form Front-end Preview:

enter image description here

4) Default Layout Markup:

enter image description here

5) Default Layout Code:

enter image description here

As you can see, here I want to do server side validations, for other fields it works fine. But for recaptcha, I do not know how to validate it if its filled or not.

What should I do from here on to make it work?

Also I want to reset recaptcha in my clearAllInputs() javascript function if success.

Any idea or thoughts ?

Thanks

1-1 of 1