Viewing 4 replies - 1 through 4 (of 4 total)
  • Fonte: https://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>’,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘need default value to disappear onclick’ is closed to new replies.