RE: Invisible reCaptcha in web forms in Liferay 7.1

Elena Stefanova, modified 6 Years ago. Junior Member Posts: 42 Join Date: 8/24/15 Recent Posts

Hi, there!

I want to ask if someone of you have ever tried to implement invisible captcha in liferay web forms? I'm talking about this one https://developers.google.com/recaptcha/docs/invisible . I need to do it in my project on liferay version 7.1-GA1. Do you think that this is possible and which is the right way to do so? The only thing that comes to my mind is to hook forms view.jsp and implement this new captcha version there.

Looking forward for your help! Thanks in advance!

Regards,

Eli

 

Shubhankit Roy, modified 6 Years ago. New Member Posts: 8 Join Date: 4/27/15 Recent Posts

Hi Eli

 

Yes we implemented this in one of our projects, but that is liferay 7 and not in 7.1

However, I hope that it should be similar in 7.1 too. You can achieve this via a fragment module to override the recaptcha.jsp of captcha-taglib. Follow the standard way as suggested by Google to use invisible recaptcha (use of data-size invisible and making a callback function to submit the form if token is valid).

In addition to this you should also override and customize the form.js of 'dynamic data mapping form renderer' to make a call to grecaptcha.execute() if there are no errors in the filled form.

Hope this helps

Shubhankit Roy

Elena Stefanova, modified 6 Years ago. Junior Member Posts: 42 Join Date: 8/24/15 Recent Posts

Thank you very much for the fast reply and for the solution that you share! It seems a great approach for solving this issue. Thank you once again!

Greetings,

Eli

Shruti Mishra, modified 5 Years ago. New Member Posts: 22 Join Date: 4/24/15 Recent Posts
Shubhankit Roy:

Hi Eli

Yes we implemented this in one of our projects, but that is liferay 7
and not in 7.1
However, I hope that it should be similar in 7.1 too. You can achieve
this via a fragment module to override the recaptcha.jsp of
captcha-taglib. Follow the standard way as suggested by Google to use
invisible recaptcha (use of data-size invisible and making a callback
function to submit the form if token is valid).
In addition to this you should also override and customize the
form.js of 'dynamic data mapping form renderer' to make a call to
grecaptcha.execute() if there are no errors in the filled form.
Hope this helps
Shubhankit Roy
Hi Shubhankit,
Can you help me to get invisible Recaptcha working. I followed your suggestions, still couldnt get it working.
Here I have posted my issue   https://liferay.dev/forums/-/message_boards/message/118102281