How to Add a CAPTCHA field to a Formidable Form for WordPress

Introduction

One of my existing customers has been experiencing spammy messages coming through to his email. Although the amount of messages isn’t high, it was still a bit annoying none the less. In this post, I will take you through the steps to adding a reCAPTCHA field into a Formidable Pro form on WordPress.

Issue Reported

This customer emailed me stating that he was getting a few emails coming through that were obviously spammy. He asked if I could take a look and see if I could help prevent these from coming through to his inbox.

Initial inspection

Its quite obvious that this was a bot causing this, and looking at the logs on the server, that was also confirmed.

Server logs, checking for spam bots
Checking the server logs for this website.

In the server logs above, you can see that there was a request to load the page at 14:00:34s and the form was submitted no more than 1 second after pretty much confirming my suspicion that this could have been a bot or infected PC sending these messages to my clients.

About this WordPress Install

This is a relatively low traffic website generating around 100 visitors a day. It is a site for a local business in London and acts as a shop window for the services that they supply.

WordPress Version : 5.0.3

Theme : Vanilla by YooTheme

Plugins installed :

  • Addendio PLUS Version 1.1.1
  • Formidable Forms Version 3.04.03
  • Formidable Forms Pro Version 3.03.02
  • Google Analytics Dashboard for WP (GADWP) Version 5.3.7
  • NextGEN Gallery Version 3.1.4
  • Really Simple SSL Version 3.1.3
  • Widgetkit Version 1.4.6
  • Yoast SEO Version 9.3

How to Add reCAPTCHA field in Formidable

The spam was coming through the contact form, and since this is provided by the Formidable Pro plugin, its a very simple fix to get a reCAPTCHA field instated.

Log in to your WordPress admin area with admin privileges. Either go to yourdomainname.com/wp-login.php or yourdomainname.com/wp-admin

Open Formidable > Forms

Click on the form that is attracting the spam messages.

Select formidable form

Add a reCAPTCHA field to the form

Drag a captcha field into formidable forms
You can either click on the field and it will add it to the bottom of the form, or drag and drop into any place on the form.

Click Update on the form. You’ll now need to set up the Site and Secret Keys.

Open Formidable > Global Settings, and then scroll down the page until you see the reCAPTCHA section. Click the hyperlink ‘free reCAPTCHA key

Formidable Forms - Sign up for a free reCAPTCHA
Signing up for a free reCAPTCHA on Formidable Forms

Once you click the link, you’ll be passed over to Google’s reCAPTCHA page. You will need to sign in as your google account. (I will assume you have a google account already)

Click ‘Admin Console’ in the top right

Now click the ‘+’ to add a site.

Fill in all the relevant details for your site, for example:

Setting up Google ReCAPTCHA

Click submit, and you’ll be taken to the page where you can grab your keys.

Copy both your Site Key and your Secret Key and add into Formidable Forms.

ReCAPTCHA site key and secret key
Adding Formidable Forms ReCAPTCHA keys

Click Update Options in Formidable Forms.

You should now be able to see your new field on your contact form

Example of form with reCAPTCHA field enabled

After this you should be done. Do you have a site that is getting spam? need any help at all? Feel free to drop me a mail or leave a message below with any issues you’re having.

Leave a Comment