Contact Form 7 onFocus fix


/ Published in: PHP
Save to your folder(s)

This was a fix for the form that allowed me to automatically replace the text when I focused on area.

Find the file text.php inside modules. Replace line 89 with this code.


Copy this code and paste it in your HTML
  1. $html = '<input type="text" name="' . $name . '" value="' . esc_attr( $value ) . '"' . $atts . 'onfocus="if(this.value==\'';
  2. $html = $html . esc_attr( $value ) . '\') this.value=\'\';" onblur="if(this.value==\'\') this.value=\'' . esc_attr( $value ) . '\';" </textarea>';

URL: http://www.ultimatelimoservice.com/reservations

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.