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.

In-Field Labels on Form Fields/Inputs

  1. Summit9inc
    Member

    Is it possible to put the label information into the actual input box/form fields? As an example, "First Name", "Last Name" could appear in the actual input box itself rather than it being forced directly below. I can display: none; for those below the input box of course, that's easy. Just wondering if I can do this as well. I have a very narrow form and am trying to do some styling, and the labels for First and Last name are just totally different than the rest. I want to keep F/L separate so I don't have to run some horrid split name function in the future, so just using a single Name field is just not a viable option.

    I'm very comfortable with CSS but I am not used to using forms that aren't built by an on site programmer. Now, I do realize that if I was building a "from scratch" form one would use JQuery for this. I don't want to, as I'm not only terrible at JQuery but, well, that's probably enough of a reason. "add a bit of jQuery that copies the title attribute to the value attribute. When the field is focused, if the value of the form equals the title attribute, we will clear the value. When focus is removed from the field, if the value of the form equals nothing, we will add the title attribute back in." Nicely put. I didn't write it.

    To get to the point, I am asking if this little feature is already in place. If it isn't, would it be recommended that I attempt this with Gravity forms or will hate and discontent occur for all but the best JQuery nuts? I'm not sure I'll be successful at it after ten hours of pulling my hair out. So, not sure where to begin. Went through the docs, didn't see anything. Its a picky detail, I'll grant that. Clients.

    Gravity is just fantastic, by the way. I'm moving all clients over to WP, using ThemeHybrid as the framework and I'll be buying a Gravity Form for every single site. I'll never be a programmer and I cannot tell you how much of a relief it is to have such a great tool at my disposal. One less thing to worry about!

    Have a great weekend, back to my Negra Modelo.

    Posted 13 years ago on Sunday June 5, 2011 | Permalink
  2. Anyone have any ideas on how to implement this? I have a client that wants his form to be as compact as possible and having the label as the starting text within the input field instead of below would be a nice touch and give the form a sleeker feel.

    Posted 13 years ago on Friday July 22, 2011 | Permalink
  3. This is possible, but it's not something Gravity Forms does out of the box. You could use the default values on the fields that support them and a little jQuery scripting to make it happen.

    http://rkt.gs/clearit

    Posted 13 years ago on Friday July 22, 2011 | Permalink