how to add a google recaptcha v2 to a form?

Any tips and tricks that has to with the ADDT that doesn't fit into one of the other categories
Posts: 37
Joined: 2010-04-28 08:34

how to add a google recaptcha v2 to a form?

Post by piripacchio » 2017-05-22 10:13

Hi all,
I'm trying to integrate a google recaptcha v2 on my website using ADDT.
I added recaptcha v2 using the data from the google site.
But the form will pass validation even if the user doesn't resolve the recaptcha.
The recaptcha appears on the page, but how can validate it?
I think I'm missing something here.

I linked the correct google js file as instructed and added the following code before my submit button:
<div class="g-recaptcha" data-sitekey="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"></div>

But it doesn't seem to work.


User avatar
Site Admin
Posts: 487
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland

Re: how to add a google recaptcha v2 to a form?

Post by Fred » 2017-05-23 10:18

Hi Tony,
You need to verify the response.
Add the response to a POST['variable'] then you can use the normal interakt/addt validation to check if the response is there.

I have found it is not that effective and still had bots registering.

Done some serious custom work that I don't really want to discuss in an open forum and the problem has been stopped.

Here is an overview of what I have in place. One aspect is not discussed in that article tho. ... bsite.html

Post Reply