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.

default value until someone enters something?

  1. graphical_force
    Member

    Hello, I am using an email field and I would like to have the text "Enter your email address" within the field. I can do this using a default value but I want it to disappear when someone starts to enter their email address. Right now, it keeps the text in it even while they start typing.

    Any way to do this?

    Thanks!

    Posted 11 years ago on Friday August 17, 2012 | Permalink
  2. I've implemented this for a client that worked great, its semantic and has good fall-back support and validation stays intact.

    There is also a variant way to do this here: http://www.gravityhelp.com/clearing-default-form-field-values-with-jquery/

    Posted 11 years ago on Friday August 17, 2012 | Permalink
  3. graphical_force
    Member

    Thanks Rob. I'll take a look at it.

    Posted 11 years ago on Friday August 17, 2012 | Permalink
  4. Thanks for that link. It confirms "While that's not a feature in the current version of Gravity Forms...", which is the info I was looking for.

    However, these jQuery solutions require a default value, which DOES NOT get erased if they skip this field; instead, it submits the form with the default value.

    I'm looking for this solution but where there's just helper text in there, not literally a "default value". So if they were to skip this field, I'd want the form to either 1) not validate if this field is required or 2) submit the form with a blank in this field if this field isn't required.
    I hope that makes sense. Anyways, GF, you have my vote for including this by default or providing a snippet.

    Thanks. Following this topic...

    Posted 11 years ago on Monday September 3, 2012 | Permalink