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.

"Watermark" a form field?

  1. tanksalot
    Member

    I might have the wrong terminology here. Due to space and color restraints I need the following. Instead of labeling the field above, to the right, etc. I would like to put the label e.g. "Name (required)" in the form field. I've seen this done and the text looks a bit greyed out/like a watermark. When the person goes to click in the field the content disappears and they have to fill in their information. How do I do that?

    Posted 13 years ago on Wednesday April 20, 2011 | Permalink
  2. You can do this with some jQuery and the custom CSS Class Name option on a field.

    http://www.gravityhelp.com/clearing-default-form-field-values-with-jquery/

    You would style the color of the input using CSS. You can find samples of targeting the inputs for manipulation here.

    http://www.gravityhelp.com/documentation/page/CSS_Targeting_Samples

    Posted 13 years ago on Thursday April 21, 2011 | Permalink
  3. I have to say that not being able to watermark fields in the traditional sense is really disappointing. I feel that it's an extremely established technique on the web, users love it and clients are requesting it. I appreciate that you've offered a hack, and it's OK - but watermarks that validate?! That's simply no good for me or my clients. Sorry for the negative response but I personally think it's a feature that should be prioritized in a HTML5 world.

    Posted 12 years ago on Tuesday August 2, 2011 | Permalink
  4. @squidgemann,

    In HTML5 it's called "placeholder" text and not a "watermark" and something we'll get around to eventually. Even so, you would still need a script solution to implement that functionality for older browsers that don't support the HTML 5 fields. Yeah, were in a "HTML5" world, but the word hasn't gotten around to everyone yet so you still have to have support for older, suckier browsers.

    This is still something that's on the roadmap for a future version, but if your clients are asking for it now, it's not difficult to implement the solution referenced above or to roll your own and implement one of the many script-based solutions out there.

    Posted 12 years ago on Tuesday August 2, 2011 | Permalink

This topic has been resolved and has been closed to new replies.