I have a Drupal 7 view that uses fields as display type.

There are three fields, and I don't want to show the row if any one field is empty.

Currently, I am adding a filter for each of the three fields to achieve this. meaning if I have 20 fields, I would have to go for 20 filters.

Is there an easier way of doing this?

P.S. I can do this by overriding the row style output template file, and then add some custom php code. But I want to know is there an easier way using the views administration interface.

1 Answer 1


You can add filter criteria corresponding to the field on which you want to hide
the row .
Suppose you want to hide the row if content: body is empty then you can add filter criteria as Content:Body not equal to "" (where value field should be left empty).
This will automatically hide the row if the specific field is empty .

  • That is exactly the problem. If I have 20 fields, I will have to add 20 filters.
    – Shuaib
    Feb 20, 2014 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.