How can I hide blank metafields on a product page?

Hi there!

I am new here trying to find a solution to hide all blank metafields.

On the product page, I made some additional sections and blocks to display more information about products. For all of them, I use metafields to provide details that are vital to different products. However, not all products can fill all metafields leaving some of them blank.

Searching this forum, I found some nearly good solutions, but they seem to apply to a different part of the product page.

Please let me know in case of additional questions. Thank you in advance!

On which block you are trying to achieve this? Also can you let me know which theme you are using?

Hi Makkaomakka! Thank you for reaching out. I do it on a symmetry theme and want to apply it to many image-with-text and multi-column sections.