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.

New Label Placement Option (In Field) when space for a form is limited

  1. Hey Guys,

    One thing that we in a lot of our gravity forms is place the label within the field on forms where space for a form is limited. We've been utilizing 2 methods (both using jQuery) and a little bit of CSS.

    I figured I would post a request here as a feature because I think it needs to be better integrated with the plugin itself as there are a few hiccups that we had to take care of in both of our implementations.

    We consider it a "compact" view of a form.

    I figured you guys do your own thing so I didn't bother posting the jQuery I am utilizing in the feature request as I figured you guys can do your own thing.



    The first implementation utilizes CSS to override the positioning of a label field. Where we basically make it absolutely positioned within a relative input </li> then utilize jQuery to show or hide the field's label if it has a value or if the field is focus/blur.


    The second implementation utilizes CSS and jQuery as well but instead of absolutely positioning the label using css we simply display:none it. Then we utilize jQuery to take the input field's label.text() value and set that as the text within the appropriate input field. You need to additionally put in a check to make sure that the on gravity_form_render that you reset the field.


    Because both of these implementations are work around there are some other challenges. Such as overriding a lot of css regarding invalid field display. (This is in part due to how we are using gravity forms outside of the drag and drop implementation I suspect)

    Posted 12 years ago on Wednesday March 21, 2012 | Permalink
  2. This was covered here, but should really be a default option...
    http://www.gravityhelp.com/clearing-default-form-field-values-with-jquery/

    Posted 11 years ago on Saturday June 2, 2012 | Permalink
  3. Hi @freak_flow our team has a pretty solid implementation for this. We actually don't utilize the default value area of the admin but instead utilize the labels. Similar concept though over all. We do however have a few more robust features. I should probably make a post and share it here for others.

    Thanks for posting that article as it should be really useful to other users looking for a super simple solution.

    Posted 11 years ago on Monday June 4, 2012 | Permalink