PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Placeholder text a different style than typed-in text

  1. jbro
    Member

    Hi, I'm using GF with the excellent clearit hack (here: http://www.gravityhelp.com/clearing-default-form-field-values-with-jquery/). With the input:focus pseudoselector I've gotten typed-in entry text to be a different style than the default content (default content is italic and gray, typing is normal and black).

    The problem is, when you take focus away, the text you entered is grayed-out and the client doesn't like this.

    Is there any way to make text boxes that have been filled out be a different text style than default content? I'm open to re-doing the javascript implementation if necessary.

    Thanks in advance to anyone who can point me in the right direction!

    Oh here's the site (currently in pre-release): http://asklegalbrains.com/

    Thanks
    jb

    Posted 11 years ago on Tuesday June 18, 2013 | Permalink
  2. There isn't a way to style it in this way because your only options here are going to be to target the input or the input:focus like you mentioned.

    You might consider giving Gravity Perks a try which has valid HTML5 placeholder support, with JS as a backup:

    http://gravitywiz.com/gravity-perks/

    Posted 11 years ago on Wednesday June 19, 2013 | Permalink