AJAX Login Modals -- Add Google reCaptcha to Your Registration Form
This article provides step-by-step instructions to add Google reCAPTCHA to an AJAX login registration form.
- Enable the Shortcode to Add Google reCAPTCHA
- Register the Site Domain With Google reCAPTCHA
- Connect AJAX Login Modals to the Google
Enable the Shortcode to Add Google reCAPTCHA
The AJAX Registration Form shortcode includes a feature to add a Google reCAPTCHA field to the registration form. By default, this feature is disabled ( checkbox = 'unchecked' ). Select the checkbox if you intend to add a reCAPTCHA field to the form.
Register the Site Domain with Google reCAPTCHA
For the reCAPTCHA box to work with AJAX Login Modals, register your site domain to use the Google API. Go to the Google reCaptcha page, and click the My reCAPTCHA button in the upper right corner.
The link opens a new page to manage existing reCAPTCHA keys, and register a new site domain to use reCAPTCHA. When registering a new site, complete the form shown below.
- Enter the ‘Label’ field;
- Select a reCAPTCHA version to activate the 'Register' button;
- Enter one or more domain names to register with the reCAPTCHA service;
- Accept the reCAPTCHA terms of service; and
- Select the ‘Register’ button to complete the form.
Connect AJAX Login Modals to the Google API
Once a site domain is registered, the reCAPTCHA admin page refreshes and displays a set of public and private API keys. These keys will be used to connect the ALM plugin with the Google API.
The reCAPTCHA admin page also provides information on client- and server-side integration for your site. Ignore that information when integrating with Popup Maker. The only data required from Google are their public (site) and private (secret) API keys.
Open the Popup Maker Settings page. In the WordPress admin, go to:
1. Popup Maker (menu) >> Settings (submenu);
2. Popup Maker Settings >> Extension (option tab);
3. Extension (tab) >> Extension Settings (category); and
4. Google Recaptcha Site Key (field) / Google Recaptcha Secret Key (field).
Copy and paste the values for Site Key and Secret Key from the Google admin page into their respective fields on the Popup Maker Settings page. Select the Save button to update the plugin option settings. The ALM registration form will update to integrate with Google and render a reCAPTCHA form.