Fonte: http://forum.zwame.pt/archive/index.php/t-277720.html
Antes da tag </head>
<script type=”text/javascript”>
<!–
function clean(it){
if (it.defaultValue==it.value) it.value = “”;
}
function rest(it){
if (it.value == “”) it.value = it.defaultValue;
}
//–>
</script>
Na pagina plugins/contact-form-7/modules/text.php subistitua a linha 91 onde esta:
‘<span class=”wpcf7-form-control-wrap %1$s”><input %2$s />%3$s</span>’,
por
‘<span class=”wpcf7-form-control-wrap %1$s”><input onfocus=”clean(this)” onblur=”rest(this)” %2$s />%3$s</span>’,
This worked great, gracias!
Great, how do I get it to work on textarea also? This only works on the input text, name, tel, and email.
@charlesjdillon
In /modules/textarea.php find this line:
‘<span class=”wpcf7-form-control-wrap %1$s”><textarea %2$s>%3$s</textarea>%4$s</span>’,
and replace it with:
‘<span class=”wpcf7-form-control-wrap %1$s”><textarea onfocus=”clean(this)” onblur=”rest(this)” %2$s>%3$s</textarea>%4$s</span>’,