[SOLVED] Integrating Google's reCaptcha

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
FCazabon
Forum Members
Forum Members
Posts: 165
Joined: Fri Nov 07, 2008 5:28 pm
Location: Trinidad & Tobago

[SOLVED] Integrating Google's reCaptcha

Post by FCazabon »

I am doing a site for visually impaired people and need a better option than the standard Captcha module. In the forum I saw some suggestions to use reCaptcha and I have registered my domain and obtained my key and secret. I have also included the script reference in my html template and put the code to display the reCaptcha in my form template.

Now, how do I get it to actually work? :)

Whether or not I click on the I am not a robot check box the form gets validated and sent.

UPDATE:

Turns out I was assuming it would be more difficult than it was. In case anyone else has problems, here's what you need to do:

1. Go to http://www.google.com/recaptcha/admin to get a new key pair

2. In CMSMS, go to the Captcha module and set the Active Library to reCaptcha.

3. Set the Key pair values on the reCaptcha Options page

4. Turn on Captcha for the form(s) that you want.

One thing that I also did was to delete the Help text for Captcha in each form.
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: [SOLVED] Integrating Google's reCaptcha

Post by paulbaker »

First off, thanks FCazabon for bothering to post the answer. It's just helped me. :D

Second, just to add a fifth step:

5. Make sure in your previous edits of the form template you didn't remove the captcha stuff [like I did], you're looking for something like this:

Code: Select all

	{if isset($has_captcha) && $has_captcha == 1}
		<tr><td>{$graphic_captcha}</td><td>{$input_captcha}<br />{$title_captcha}</td></tr>
	{/if}
and

Code: Select all

	{if $captcha_error}
		<div class="error_message">{$captcha_error}</div>
	{/if}
You will need this code or similar in your form template for any captcha to appear.

Works great, as usual, good old CMSMS! ;D
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: [SOLVED] Integrating Google's reCaptcha

Post by Rolf »

- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Locked

Return to “Modules/Add-Ons”