This tutorial shows how to enable captcha in Magento.
Captcha can be enabled via Magento Dashboard. You can use it to protect user login form to reach admin panel. Also, it is used for the contact forms to avoid spam. Let’s check how to enable captcha for them both.
CAPTCHA for the Dashboard Login form. The following steps should be performed to have it activated:
Navigate to System> Configuration > Advanced> Admin section in the Dashboard.
Select ‘CAPTCHA’ from the list of available items. Select YES for ‘Enable CAPTCHA in Admin’ to get the list of available options to manage. Using those appearance and functionality of CAPTCHA can be controlled:
Font: allows selecting the font family to be used for captcha.
Forms: select which form you’d like to protect with captcha. This may be Admin login, Admin forgot password, or both.
Displaying Mode: specify if captcha appears constantly or after several unsuccessful login attempts.
CAPTCHA Timeout: period of time (in minutes) for the captcha to be valid.
Number of Symbols: specify the range of min and max symbols for the captcha.
Symbols Used in CAPTCHA: set the list of characters (letters and numbers only) that can be used for captcha.
Case Sensitive: select if you’d like to have captcha case sensitive or not:
- Use ‘Save Config’ button to update the changes.
Captcha shows up in the login page now according to the settings above.
CAPTCHA for the Contact form. In order to protect contact form with captcha, additional extension should be installed and configured. Steps to perform are the following:
Navigate to the System > Magento Connect > Magento Connect Manager. A new extension for the captcha will be installed through this section. Magento may prompt you to log in again as administrator.
Click ‘Install Now’ button.
Next, you have to press ‘Get Extension Key’ button to get the URL for extension. Copy the key you’ll get:
Get back to the Magento Connect Manager in the Dashboard. Open the ‘Install New Extension’ tab. Paste the selected key to the ‘Paste extension key to install’ field and click ‘Install’ button to run.
After Magento Connect downloads the extension, click ‘Proceed’ to start the installation of this extension.
Once installation is finished, click ‘Refresh’ button. ‘contactsformcaptcha’ should now appear in the list of extensions under Manage Existing Extensions. This means it has been successfully installed to your store.
Return to the admin panel of the store. Navigate to System> Configuration> General> Contacts> Contacts Form Captcha. Here you can enable the captcha for contact form and edit the settings:
Click YES for ‘Enable Captcha’ first of all;
Public Key: type Google reCAPTCHA site key here;
Private Key: type your Google reCAPTCHA secret key here;
reCaptcha Theme: select the layout interface here for the captcha form;
ReCaptcha Language: choose the language for the captcha interface:
NOTE: sign up for a reCAPTCHA account to get the valid keys.
- Use ‘Save Config’ button to update the changes and check the contact page of the site. Captcha has been successfully applied to it.
Now you know how to enable captcha for the login and contact forms in Magento.
Feel free to check the detailed video tutorial below: