• I saw another post on this but nothing was actually shown about how to do it. Does anyone know how to put the fields in the boxes instead of outside and have them erase on focus?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I actually just did this today. It is pretty easy, open up modules/text.php, and add this on line 75:

    if ($value) {
    $atts .= ‘ onFocus=”if(this.value==\” . $value . ‘\’) { this.value=\’\’; }”‘;
    $atts .= ‘ onBlur=”if(this.value==\’\’) { this.value=\” . $value . ‘\’; }”‘;
    }

    This will erase the field when they click on it if the text is still the default (i.e ‘Your Name’) and will add it back in when they click to a different field if they left it empty.

    to make the form values appear inside the text fields rather than outside them you need to specify their value in the ‘form’ window on the plugin’s admin page such as:

    <p class=”contactField”>
    [text* your-name value=”Name”] </p>

    in this case the value=”Name” is what you need to add/change for each

    …and for textarea use the Forum post here

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Contact Form 7] erase fields onFocus’ is closed to new replies.