Clearing Input Forms with Contact Form 7

Many websites today will not have labels next to their input boxes anymore. Instead they place the text inside the input box. Contact Form 7 plug in can do this out of the box, but the user has to erase what is in the box before they can type in their information. This is a) annoying and b) not user friendly at all. Fortunately there is a hack that makes this work. Special thanks to emj for this solution.

Note that this is a bit of a hack, so not sure how it will work as you upgrade to newer versions.

First: add this javascript to header.php


Second: in the contact form 7 plugin folder, edit file /modules/text.php

Third: find line 76
$html = ‘‘;

Fourth: between ‘input’ and ‘type’, add:
onFocus=”clearText(this)” onBlur=”restoreText(this)”

That should do it. It isn’t perfect, but it works pretty well.

Adding An Animated Icon To Genesis Responsive Menu

By Dave Fogel | June 23, 2015

In this tutorial, we are going to be adding an animated icon and a responsive menu to the genesis starter theme from combining two different sources. For the responsive menu, we are going to be using the Genesis Responsive Menu 2.0 created by Ozzy Rodriguez.  The full tutorial is located here. You can download the…

What Does Your Website Say About Your Business

By Dave Fogel | May 29, 2015

OK, let’s get this out of the way first – I might be a little biased since I build websites in St. Augustine and Jacksonville for a living. Now that that is out of the way let’s talk about websites. For me, a website is a reflection of your business, just like your storefront or…

Advantages of working with a St. Augustine Web Designer

By Dave Fogel | May 22, 2015

Yes, I realize you can work with anyone all over the world when it comes to finding someone to build your website.  Some people really like the idea of working with someone from India, mainly because they get their website for a fraction of what it costs to use someone in the USA. But when…

Posted in

Dave Fogel

Leave a Comment