Please Note: We are no longer using forums to facilitate standard support. 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.

Auto Flush PrePopulated text ??

  1. I'm not sure if this is a "how do I" or a feature request.

    What I'd like to be able to do is have the text I've pre-populated into a form field automatically disappear as soon as the site visitor clicks into the field.

    E.G. Name: | please type your name here |

    " Name: " being the field title and "| please type your name here |" being the pre-populated field. As soon as the user entered the field the "please type your name here" would vanish.

    Currently, if I pre-pop a field the user has to 'manually delete' whatever is in there.

    Am I being too anal? Jim

    Posted 5 years ago on Friday November 6, 2009 | Permalink
  2. Not at all. I don't think it's possible now, although it might be using jQuery. But it's a feature we plan on adding in the future.

    Posted 5 years ago on Friday November 6, 2009 | Permalink
  3. It's your lucky day Jim, we have just posted a blog post on how to use jQuery to clear default values on click. You can get the details here:

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

    Posted 5 years ago on Friday November 6, 2009 | Permalink
  4. Okay! Ask and I shall receive!

    But wait: I tried to run the downloaded file "jquery-1.3.2.min.js" and I get a "Windows Script Host" error advising a "document is undefined"

    .... uhoh! and you say:

    "This snippet requires that the jQuery library is already loaded in your theme to function properly."

    Just exactly WHERE in my theme do I 'load' the jQuery library? ...I'm assuming by load you just mean FTPing it into place.

    I guess maybe I should have warned you that I;m just like a regular person who struggles with the mysteries of mere HTML/CSS.

    Jim

    Posted 5 years ago on Friday November 6, 2009 | Permalink
  5. Jim, can you send me a link to the site you're working on and I'll be happy to look at it for you. A lot of themes already include the jQuery library so you may not need. You can email me directly - kevin (at) rocketgenius.com

    Posted 5 years ago on Friday November 6, 2009 | Permalink
  6. Jim, if this is for your main site, I took a quick look at the page source and found that you're theme is actually calling the jQuery library twice in the < head > section. I'm not sure if that's you working on it, or if that's something that already existed.

    screenshot

    You only need to reference the script once. It's possible a plugin is calling the library in as well - it's not that uncommon for that to happen. It's best to remove one of the references if possible.. keeping the reference to the newer version is preferable.

    Anyhow, since you're calling the library in here, you shouldn't need to add it again for the clearing script to work. If that just confuses things further, or If you do need help with another site, just let me know.

    Posted 5 years ago on Friday November 6, 2009 | Permalink
  7. Hey Kevin! Jeez ...you guys better watch out -- you're liable to have customers complaining about the support being too fast and courteous (JOKE!)

    Seriously, I think you're telling me that I already have the jquery library so should be ready to try using the script.

    The site you checked out is my test site for the time being. The real action is over at http://www.hatchtown.com -- I checked page source http://dl.dropbox.com/u/2882360/wwwHatchtowncom_sshot.gif and found a single ref to jquery.

    Jim
    PS -- I will email you about the "problem" with the multiple jquery calls at the other site.
    Tnx - J

    Posted 5 years ago on Saturday November 7, 2009 | Permalink
  8. Hey Jim, if that's all the customers complain about, I'm sure we can handle it. We appreciate you guys and want to help all we can.

    I looked at the hatchtown.com site and yes, you should have everything you need there to support the clear fields script. You just want to put the script snippet in the code somewhere AFTER the call for the jQuery library.

    If you have problems getting it to work, just point me to the page with the form and we'll whip it into shape.

    I did reply to your email about the other site as well. Let me know if I can help there.

    Cheers.

    Posted 5 years ago on Saturday November 7, 2009 | Permalink

 

Support Tickets

Open A New Support Ticket
 Open A New Priority Support Ticket *

* Developer license holders only