Forms are a great way to collect vital information from your visitors. However, one downside is spammers submitting bogus information, sometimes containing malicious code.
To help screen for these spammers, Elementor forms now lets web creators integrate Akismet anti-spam filter into their forms.
Add an anti-spam filter to your forms
- Download and install the Akismet plugin. For more details, see Install WordPress plugins.
- Create an Akismet account. For more details, go to the Akismet site (external site).
After you register with Akismet, you’ll be given an API key.
- Copy your Akismet API key.
- Open WP Admin.
- Go to Settings>Akismet Anti-spam.
- In the dashboard, click Manually Enter an API key.
- Enter your Akismet API key.
- Click Connect with API key.
- In Elementor Editor, create a page with a form. For details about creating forms, see Form widget.
- Select the form.
Notice that when you install Akismet, a new Akismet Spam Protection section is added to the Content tab.WarningThe fields in the Akismet Spam Protection section are filled with dummy text. You’ll need to enter the shortcode information yourself for it to take effect.
- Save or Publish the page with the form.
Add shortcodes to Akismet Spam Protection
In order for spam protection to work, you need to determine which fields to filter. For example, you can filter the email and message fields. You determine which fields to scan, by entering that field’s shortcode in the Akismet Spam Protection section.
Example: Apply spam protection to the email field:
- In the panel, click the Content tab.
- Open the Form Fields section.
- In the Form Fields section, click the Email field.
- In the Email field, click the Advanced tab.
- In the Advanced tab, copy the Shortcode.
- In the Content tab, open the Akismet Spam Protection section.
- Paste the shortcode into the Email field.
- Save or Publish the page with the form.
Test the spam filter
After setting up the spam filter, you should test to make sure it’s working.
To test the spam filter:
- Go to the Akismet website.
- There you’ll find text specifically designed to trigger the spam filter, when entered into specific fields, such as the Name field. Copy the text for one of these fields.
- In the Elementor Editor, go back to the page with the form you want to test.
- Click the view icon .
- Paste the text you copied into the appropriate field.
- Fill in all mandatory fields with dummy text.
- Click the button to submit the form.
You should receive an error message. - In WP Admin, check your form submissions. For details about checking form submissions, see Form submissions.
Your dummy submission should not appear.
Turn Akismet off for selected forms
You have the option of turning off the Alismet spam filter for selected Elementor forms.
To turn Akismet off:
- Navigate to the selected form.
- In the panel, under the Content tab, scroll down and open the Akismet Span Protection field.
- Toggle Akismet Spam Protection to Off.
Akismet will not scan these form submissions.