Is it possible to clear the labels placed in the input field?
Example, I have an email field, in this field is the word "Email". As soon a visitor clicks on it to enter his email the word (label) should dissappear. Is there a way to create this?
Is it possible to clear the labels placed in the input field?
Example, I have an email field, in this field is the word "Email". As soon a visitor clicks on it to enter his email the word (label) should dissappear. Is there a way to create this?
This would be a useful option indeed.
I have tried this post but can't figure out how to let this work with contactform 7.
hmm, I had the same problem and got textboxes working like this:
a) add this javascript to header.php
function clearText(field)
{
if (field.defaultValue == field.value) field.value = '';
}
(thanks http://www.bradino.com/javascript/clear-textfield-default-value-onclick/)
b) in the contact form 7 plugin folder, edit file /modules/text.php
c) find line 76
$html = '<input type="text" name="' . $name . '" value="' . esc_attr( $value ) . '"' . $atts . ' />';
d) between 'input' and 'type', add:
onFocus="clearText(this)"
worked fine for me, bit of a hack tho
:)
You must log in to post.