How to avoid displaying fields with empty data?

3 posts by 2 authors in: Forums > CMS Builder
Last Post: April 9, 2021   (RSS)

By Deborah - April 9, 2021

Yes, mark99, you can do that. Here's an example for a list page record:

<?php if ($record['summary']): // show only if field contains content ?>
<p><?php echo $record['summary']; ?></p>
<?php endif ?>

~ Deborah

By mark99 - April 9, 2021

That worked perfectly, thanks Deborah :).