Field labels for reference fields are always displayed when the formatter provided by this module is used, whether the field contains values or not. I think that the problem is that the formatter returns empty markup when there are no values.

      else {
        $element[0]['#markup'] = '';
      }

Returning $element as an empty array instead fixes the problem.

CommentFileSizeAuthor
#1 1280066_1.patch511 bytesgiorgosk

Comments

giorgosk’s picture

Status: Active » Reviewed & tested by the community
StatusFileSize
new511 bytes

this patch fixes the issue the way dboulet described

jec006’s picture

Committed, thanks.

As a sidenote, its easier on module maintainers if the patch is made from the module root instead of the drupal root.

jec006’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.