How Do I Hide Unspecified Items in Blocks?
Permalink
I have a block where the user simply enters text fields in the form editor. Not all of them are required. When the block is added, it prints out all the items. It doesn't display empty items, but the code is still there with empty open and close tags:
The problem I have with this is that if there is default styling for those tags, they will still show up, but with no content.
So... how do I make it so that nothing is "printed out" if the fields are left blank?
<h1 class="itemX"></h1>
The problem I have with this is that if there is default styling for those tags, they will still show up, but with no content.
So... how do I make it so that nothing is "printed out" if the fields are left blank?