You are viewing limited content. For full access, please sign in.

Question

Question

Hide Field Labels

asked on January 18, 2016 Show version history

Is there a way to not show field labels on forms? I am trying to create an HR application and I don't want the field label to show for some check boxes for a part time or full time option. If you leave the option blank it just leave a huge white space.

0 0

Answer

SELECTED ANSWER
replied on January 18, 2016 Show version history

Hi Chynna,

If it's for a particular field, say one with id "q1", then the following CSS should work:

#q1 label {display: none;}

If there are multiple fields where you'd like to have this, you can add a CSS class to the field, say "hide-label", and use the following snippet instead (i.e., change the selector):

.hide-label label {display: none;}

Did I understand correctly?

Hope this helps!

Update: This can also hide the option labels for checkboxes. To only hide the overall element label but not these, you can use something like this:

.hide-label .cf-label {display: none;}
2 0

Replies

replied on April 4, 2017 Show version history

When I used this solution, the checkbox choices description is removed as well.  Any suggestions on a fix or on what I am doing wrong?

LFQ.jpg
LFQ.jpg (65.59 KB)
1 0
replied on April 4, 2017 Show version history

Excellent point, Sara. I didn't realize those were also label elements. You can use something like

.hide-label .cf-label {display:none;}

to only hide the overall element label but not the individual checkbox option labels. I'll update the original response with this caveat. Thanks for pointing it out!

1 0
replied on April 5, 2017

Great, that worked just like I wanted!  Thank you! yes

0 0
replied on January 18, 2016

Yes!!!!!! This works great thanks! Is there a a quick CSS reference that shows examples?

0 0
replied on January 18, 2016

The Help File has some information on using CSS. For a more detailed resource, I recommend the CSS resource at W3Schools.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.