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.

Testing out Twitter Tools

By Dave Fogel | January 21, 2011

This program will auto post your wordpress blog to your twitter account.

Testing out wordbooker

By Dave Fogel | January 21, 2011

Testing the wordbooker plugin.

Getting WordPress to install and work on an IP

By Dave Fogel | January 12, 2011

If you have a reseller account, and you want to work on a live copy of a site, then there are a few keysteps you need to take for it to work. (you could always run it on your HD instead) So let’s say you have a client with a site called www.netviperinteractive.com and you…

Posted in

Dave Fogel

Leave a Comment