Spammers often use contact forms as a way to spam your email. It’s easy to prevent that using the Contact Form 7 and Akismet plugins – Contact Form 7 is a simple, free plugin for creating forms, and Akismet is already installed in WordPress by default
Here’s how to use Akismet to protect your Contact Form 7 Forms:
1. Activate Akismet from your WordPress plugins menu
2. Install and activate the Contact Form 7 plugin
3. Create a simple contact form.
4. In the form options page, remove the auto-generated code and paste this in its place:
<p>Your Name (required)<br /> [text* your-name akismet:author class:sidebarinput] </p> <p>Your Email (required)<br /> [email* your-email akismet:author_email class:sidebarinput ] </p> <p>Subject<br /> [text your-subject akismet:author_subject class:sidebarinput ] </p> <p>Your Message<br /> [textarea your-message class:sidebarinput] </p> <p>[submit "Send"]</p>
5. Save your changes, and you’re done.
Now you can add this new contact form to a page, and Akismet will protect it from spammers.
Questions? Comments? Yeah-buts? Share in the comments section below.