WordPress.org

Support

Support » How-To and Troubleshooting » [Plugin: Fast Secure Contact Form] How to clear textarea default text value on click?

[Plugin: Fast Secure Contact Form] How to clear textarea default text value on click?

  • shengjin
    Member

    @shengjin

    Hi, Mike,

    I’ve added some text inside textarea fields to explain to my client what to say in the field. However, when a user clicks into that field, before they can type, they have to highlight and delete the default text.

    I feel like I’ve seen ways around this, so that once you click in, the text that was in the field goes away, but can’t seem to find answer in this support forum. I tried to add this code “<input onfocus=”this.select()” type=”text” value=”some text” />” But, there is no success.

    I also would like to keep the default text color lighter (grey) instead of black.

    Thanks in advance for any help.
    Shengjin
    http://wordpress.org/extend/plugins/si-contact-form/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Ramzii
    Participant

    @ramzii

    I would like a solution for this aswell.

    Anyone out there? Thanks!

    Fleur
    Member

    @annagee

    onclick=”this.value=”;” onfocus=”this.select()” onblur=”this.value=!this.value?’Text Here’:this.value;” value=”TEXT HERE”

    Change the “TEXT HERE” with your desired default text. Hope that helps :))

    Fleur
    Member

    @annagee

    ooops wrong one. try this:

    onclick=”this.value=”;” onfocus=”this.select()” onblur=”this.value=!this.value?’TEXT HERE’:this.value;” value=”TEXT HERE”

    Change the “TEXT HERE” with your desired default text. Hope that helps :))

    Ramzii
    Participant

    @ramzii

    Thanks for the suggestion annagee.

    But I dont think ‘Fast Secure Contact Form’ supports straight javascript input? Or am I doing it wrong?

    Image here.

    Fleur
    Member

    @annagee

    Ooops my bad. I wasn’t really reading the whole post title. My solution works if you are directly editing the html code of the form. I haven’t used Fast Secure Contact form before so I don’t really know. But just try, it might work. I will also try to take a look at FSC’s files. Maybe a little hack would help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Fast Secure Contact Form] How to clear textarea default text value on click?’ is closed to new replies.