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.

WPML and Genesis Footer

By Dave Fogel | August 9, 2013

Recently we worked with WPML and the Genesis Framework and had a very hard time getting the Footer to Translate correctly. The two things we needed to do was “Return to Top” and the credits for the site design. First we were using Genesis Simple edits to change the footer, but that did not work…

WordPress “Add Media” button not working on 3.5 Fix

By Dave Fogel | August 1, 2013

Though we have upgraded many sites to 3.5, this is the first time we have run into the problem of the “Add Media” button not working. When you click on it, nothing happens at all. But, don’t worry because there is a fix and it is very simple. You need to open your “wp-config.php” file…

Three sites posted on StudioPress

By Dave Fogel | May 30, 2013

We are proud to say that three of our recent designs on the Genesis Framework have been acceptable to be posted on StudioPress’s website showcase. You can see them here. Boomer Benefits Roof To Deck HDI Architect

Posted in

Dave Fogel

Leave a Comment