In order to prevent spam, one can use Google reCAPTCHA as it is a very good option. It is free and pertinent while submission.
You can install Google reCaptcha plugin using 2 different ways:
- Automatic Installation: You can install a plugin from the backend of your WordPress. Click Here to see how you can do the automatic installation.
- Manual Installation: You can install the plugin manually using SFTP or FTP tool as well. Click Here to see how you can do a manual installation.
Watch this video for more clarification.
Registration for getting reCAPTCHA keys
In order to get Google reCaptcha on the Event submission form, you need to,
- Register on reCAPTCHA website to get reCAPTCHA keys.
- Enter the details of your website asked for.
- After the submission you will get a reCaptcha site key and a secret key.
- Copy these keys.
- Go to theme backend at WP-admin >> Event Manager >> Settings >> Google Recaptcha
- Paste the keys in respective boxes
- Save changes
Now, you will get reCAPTCHA on the event submission form as you can see in below screenshot:
If any user will not insert the reCAPTCHA, then it will ask for verifying the reCAPTCHA with this message:
Customization: Overriding/Customizing The Template Files
For overriding or customization, template files can be found in the wp-event-manager-google-recaptcha/templates/ directory.
To override a template file,
- Create directory “wp-event-manager-google-recaptcha” under your theme folder
- Copy the template file to “/wp-content/yourtheme/wp-event-manager-google-recaptcha/” directory.
- Your theme will use all the template files from the “/wp-content/yourtheme/wp-event-manager-google-recaptcha/” directory instead of the plugin’s template file (/wp-content/plugins/wp-event-manager-google-recaptcha/).
- event-google-recaptcha.php template file lists the user’s alerts.
Remember: if you have overridden template file and plugin frequently updating then you need to sync template file with new updates from the plugin’s template file for better functionality and new features.