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):
2) My Contact Form Static Page (Backend):
3) Contact Form Front-end Preview:
4) Default Layout Markup:
5) Default Layout Code:
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