When you need to add a relatively simple new feature like this, if you’re anything like me, you don’t want to be reading through pages and pages of documentation; you want an example you can implement quickly then edit as you see fit. I couldn’t find any such thing when I was integrating, so hopefully these 4 simple steps will help you.

Step 1

Sign up and get your keys here: https://www.google.com/recaptcha/admin (you will get a SITE key and a SECRET key, used later)

Step 2

Include this on your page:

Step 3

Add the following into your form:

Step 4

On form submission do this:

Using the following function:


This code is free to use at your own discretion. It comes without warranty. Please feel free to feedback any edits.

Add a comment