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.
Question
Question
Answer
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;}
Replies
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?
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!
Great, that worked just like I wanted! Thank you!