J3.x

Google ReCaptcha

From Joomla! Documentation

Revision as of 14:50, 26 November 2022 by Cmb (talk | contribs) (Several markup and capitalization changes.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Other languages:
Deutsch • ‎English • ‎Nederlands • ‎español • ‎français • ‎italiano • ‎svenska
Tutorial
How to set up
Google reCAPTCHA & Invisible reCAPTCHA
in Joomla
Joomla! 
3.x

Google introduced a no CAPTCHA reCAPTCHA API in December 2014. The reCAPTCHA plugin, which protects your contact and registration forms against spam, has been updated in Joomla! 3.4.0. While still supporting the old reCAPTCHA 1.0, you can use the reCAPTCHA version 2.0. A significant number of your users can now attest they are human without having to solve a CAPTCHA. Instead with just a single click, they’ll confirm they are not a robot!

As of Joomla 3.9, a new plugin CAPTCHA - Invisible reCAPTCHA has been added, allowing you to use Invisible reCAPTCHA on your websites. It allows you to validate requests in the background. Your users don't have to perform any action to validate a form.

Get reCAPTCHA[edit]

  • Go to: https://www.google.com/recaptcha
  • Click on the top right button Admin Console or Get ReCaptcha.
  • Sign in with your Google account. If you don't have one, create one.
  • Choose the type of reCAPTCHA you would like to use. Prefer the reCAPTCHA V3 type.
  • Register your new site by filling the necessary fields.

For additional guidance in choosing the type of reCAPTCHA, visit Google's Guide page, Choosing the type of reCAPTCHA.

Google reCAPTCHA will provide you two keys:

  • One Site key
  • One Secret key

Set Up Captcha[edit]

Choose one of the reCAPTCHA types below.

Set Up Captcha - reCAPTCHA Plugin (V2 Only)[edit]

  • Log into your website's Administrator.
  • Go to Extensions  Plugins  CAPTCHA - reCAPTCHA
  • Edit the plugin:
    • Status Set to Enable.
    • Version Choose 2.0.
    • Site key and Secret key Copy and paste the Site and Secret keys provided by Google reCAPTCHA into their appropriate fields.
    • Theme Choose one of the two available themes.
    • Click Save & Close.

J3.x-Google-ReCaptcha-plugin-en.png

Set Up CAPTCHA - Invisible reCAPTCHA Plugin[edit]

  • Login to your website's Administrator.
  • Go to Extensions  Plugins  CAPTCHA - Invisible reCAPTCHA
  • Edit the plugin:
    • Status: Set to Enable.
    • Site key and Secret key Copy and paste the Site and Secret keys provided by Google reCAPTCHA into their appropriate fields.
    • Badge Select the position of the badge on your front end.
    • Tabindex The tabindex of the challenge. This option can be useful if other elements on your page use tabindex and you want to make the navigation easier. The default value is 0, but you can change it so that your user can focus on the challenge after a certain amount of tab hits.
    • Callback (Optional) JavaScript callback, executed after successful reCAPTCHA response
    • Expired callback (Optional) JavaScript callback, executed when the reCAPTCHA expired
    • Error callback (Optional) A JavaScript callback, executed when the reCAPTCHA encounters an error
    • Click Save & Close.

J3.x-Google-Invisible-ReCaptcha-plugin-en.png

Enable CAPTCHA - reCAPTCHA or CAPTCHA - Invisible reCAPTCHA[edit]

For Contact and Registration Form[edit]

  • Go to System  Global Configuration  Site tab
  • Default Captcha Select CAPTCHA - reCAPTCHA or CAPTCHA - Invisible reCAPTCHA.
  • Click Save & Close.

J3.x-Google-ReCaptcha-Global-Configuration-en.png

J3.x-Google-Invisible-ReCaptcha-Global-Configuration-en.png

Edit the Contact Form Options Setting

  • Go to Components  Contacts  Options  Form tab  Allow Captcha on Contact.
  • Select Use Global
  • Select Save and Close

For the Registration Form Only[edit]

  • Go to Users  Manage
  • Click on the Options button at the top right and select the User Options tab.
  • In the CAPTCHA option, choose one of the following:
    • None Selected: This setting ignores the Default CAPTCHA setting in Global Configuration. Use it when you want reCAPTCHA in the Contact forms but not in the Registration form.
    • CAPTCHA - reCAPTCHA/CAPTCHA - Invisible reCAPTCHA: Only needed if the default CAPTCHA in Global Configuration is set to None Selected but you want the reCAPTCHA in the Registration form only, and not in the contact forms.
  • Click Save & Close.

You can now use the reCAPTCHA in your forms. Test your reCAPTCHA to ensure it is working correctly.

J3.x-Google-ReCaptcha-in-a-Form-en.png

J3.x-Google-Invisible-ReCaptcha-in-a-Form-en.png