Hide label if field is empty

Created on 8 March 2016, almost 9 years ago
Updated 4 July 2023, over 1 year ago

Is there an easy way to hide a label in a view if the field is empty? I have checked "Hide if empty" but the label still display even if the field is empty.
Under the "Hide if empty" it says "Enable to hide this field if it is empty. Note that the field label or rewritten output may still be displayed. To hide labels, check the style or row style settings for empty fields. To hide rewritten content, check the "Hide rewriting if empty" checkbox."
I cannot find anything in the style settings about hiding labels and do not know anything about the row style settings?
Does anyone have any insight? Will I need to modify my template?

I am using an unformulated list of fields

πŸ’¬ Support request
Status

Fixed

Version

8.0 ⚰️

Component
ViewsΒ  β†’

Last updated about 2 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States bloomt

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡΅πŸ‡ΉPortugal fcertal

    #11 worked for me.

  • πŸ‡§πŸ‡·Brazil claudia sotto

    Can't hide label in view if field is empty.

    Please reopen this issue.

    If I create a label, and the field is empty, The label appears at the view page.
    I choose to Hide if it is empty, hide rewriting if empty, and treat 0 as empty.

  • πŸ‡¦πŸ‡·Argentina abelpzl

    I almost drove myself crazy trying to figure out why the empty field tag kept showing up. πŸ˜‚
    Thanks to #8 I understood what the problem was, by disabling branch debug mode the tag was finally hidden.
    Shouldn't this work differently?

  • πŸ‡ΊπŸ‡ΈUnited States jjeffrie

    Again, I'm here to thank #8. I was struggling to figure out why my labels continued to be displayed.

    I'm on Drupal 10.2.7 and it still happens.

  • πŸ‡ΊπŸ‡¦Ukraine rollins

    #11 resolved this bug, thank you!

  • πŸ‡­πŸ‡ΊHungary pal_ur

    https://www.drupal.org/project/drupal/issues/2683749#comment-11030147 πŸ’¬ Hide label if field is empty Fixed saved my day and night... If Twig Development mode is enabled, Views field hiding doesn't works.

    It would be so nice get a warning in Views, if "Hide if empty" is chekced and Twig Development mode is enabled.

Production build 0.71.5 2024