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.

Hide title class for one field?

  1. Hello all,

    I'm trying to create a field similar to 'name' where there are two fields and the second field has the title hidden (so that the spacing works. i.e.

    Login Information (hidden title)
    Field one Field Two
    description decription

    anyone have any idea how to do that? thanks!

    Posted 13 years ago on Wednesday January 4, 2012 | Permalink
  2. You can achieve the side-by-side fields with our ready classes:

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

    Then you can just hide the label of the second field via CSS. Give it a whirl and post back with a form link if you get stuck.

    Posted 13 years ago on Thursday January 5, 2012 | Permalink
  3. hey thanks Rob. The only problem I'm having is regarding what css to add to hide the title of that second field. Any thoughts?

    Posted 13 years ago on Thursday January 5, 2012 | Permalink
  4. Each field has it's own unique ID that you can target. I can help you out with that if you want to post a link. You can use firebug for firefox or chrome developer tools to inspect the page elements.

    Posted 13 years ago on Thursday January 5, 2012 | Permalink
  5. thanks a lot Rob. I use firebug but just not sure how to hide the title (also it doesn't fit on the same line) via css. Here's link

    http://lihomefinder.com/cogentwebservices.com/?page_id=33

    Posted 13 years ago on Thursday January 5, 2012 | Permalink
  6. also, I'm referring to the 'point2 password and login' section

    Posted 13 years ago on Thursday January 5, 2012 | Permalink
  7. In your theme's stylesheet, the margin is causing them not to align properly:

    [css]
    #content .post ul li, #content .page ul li {
    list-style-type: square;
    margin: 0 0 0 20px;
    padding: 0;
    }

    So, to fix that you can place this (feel free to place some bottom margin if you want some spacing under each field):

    [css]
    .gform_wrapper li {
    margin: 0 !important;
    }

    To hide the label and account for the space that is now there because it's gone use:

    [css]
    li#field_2_5 .gfield_label {
    display: none;
    }
    #field_2_5 {
    margin-top: 29px !important;
    }

    or you can use visibility: hidden, if you don't want to mess with the top margin:

    [css]
    li#field_2_5 .gfield_label {
    visibility: hidden;
    }
    Posted 13 years ago on Thursday January 5, 2012 | Permalink