Home › Forums › Add-ons › Flexible Content Field › Show Empty Fields › Reply To: Show Empty Fields
It doesnt work, all i want to do is make it so if the layout isnt active/selected to display a placement/empty module instead.
Lets say ive added the layout “Head and Neck” to the form, the remaining 15 layouts are inactive. Only Head and Neck would display and it wouldnt matter about
<!-- Image Start -->
<?php $image = get_sub_field('preview_prop_shoulders');
if( !empty($image) ): ?>
<img class="media-object" width="100px" src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
<?php else: ?>
<img class="media-object" width="100px" src="<?php bloginfo('template_directory'); ?>/images/pdo.png">
<?php endif; ?>
<!-- Image End -->
because it still wouldnt display (for example) the shoulder placement.
Is there a way to check if its been populated and if it hasnt, display a placement, thats all im trying to achieve…
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.