Contact Form 7 – clearing fields on input
-
I am trying to achieve what’s been asked in this post basically how to clear input fields when you click…the answers to linked post don’t seem to work with Contact Form version 2.4.6
I have managed to get it working on the text input fields…but not the text area fields…by adding this to modules/text.php
‘backticks’ if ( $value != ” ) {
$atts .= ‘ onfocus=”if (this.value == \” . esc_attr( $value ) . ‘\’) {this.value = \’\’;}” onblur=”if (this.value == \’\’) {this.value = \” . esc_attr( $value ) . ‘\’;}”‘;
}
$html = ‘<input type=”text” name=”‘ . $name . ‘” value=”‘ . esc_attr( $value ) . ‘”‘ . $atts . ‘ />’;’backticks’site I am working on is here
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘Contact Form 7 – clearing fields on input’ is closed to new replies.