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.

Clearing Default Field Values with jQuery

  1. Chris Higgins
    Member

    So stoked with this method (http://www.gravityhelp.com/clearing-default-form-field-values-with-jquery/?_login=caab2b87a2/) for adding default values inside of inputs. Just wondering if it's possible to style the default value text without affecting the text that the user enters into the input (eg. a light grey, italic default value, and a black, regular user entered value)?

    Cheers,

    Chris

    Posted 12 years ago on Tuesday May 1, 2012 | Permalink
  2. Chris, I think your best bet would be to use a script that places the labels inside of the input - where you could target and style the labels independently of the inputs.

    I've implemented this for a client that worked great, its more semantic and has better fall-back support and validation stays intact.

    Posted 12 years ago on Wednesday May 2, 2012 | Permalink