WordPress Contact Form 7 Postcode plugin

Edited: 18/3/2018 with screenshots and to recognise an update.

Some genius at work pointed out that the contact forms on the works web site weren't validating properly.

Whoops, my bad.

So I changed the email and telephone inputs to their proper HTML5 types, but there was the postcode box that the spammers where filling in with crap, so I wrote this little plugin for Contact Form 7 that adds postcode validation.

Once installed, it adds the Postcode option to the form builder:

Add the usual id, class and required options.

It's free to use and abuse as you feel necessary, just a link back to the original would be nice.

Congrats to MrJoshFisher for adding placeholder support, I LOL'd and LOL'd when that came up 🙂

Download here.

One thought on “WordPress Contact Form 7 Postcode plugin

  1. Hi There

    It seems to working ok, ie validating the postcode when a ‘non-postcode’ is put it and not erroring when a correct one is put in. However its preventing the form from being submitted (even with a correct postcode in) CF7 gives the problem with field error. but doesnt show any errors against the field. But I’ve pinned it down to the postcode field as if i remove it the form submits fine.

    Any thoughts why that maybe?

Leave a Reply

Your email address will not be published. Required fields are marked *