WordPress.org

Ready to get started?Download WordPress

Forums

Fast Secure Contact Form
How to clear textarea default text value on click? (6 posts)

  1. shengjin
    Member
    Posted 1 year ago #

    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/

  2. Ramzii
    Member
    Posted 1 year ago #

    I would like a solution for this aswell.

    Anyone out there? Thanks!

  3. Fleur
    Member
    Posted 1 year ago #

    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 :))

  4. Fleur
    Member
    Posted 1 year ago #

    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 :))

  5. Ramzii
    Member
    Posted 1 year ago #

    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.

  6. Fleur
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic