Home › Forums › General Issues › show a pre-defined image upon selection of radio button › Reply To: show a pre-defined image upon selection of radio button
I’d be more inclined to use a True/False field. You can then do something like:
<?php if ( get_field( 'display_watercooling' ) ): ?> Your image goes here <?php endif; ?>
So using an True/False field called ‘Display Watercooling’, if it’s then ticked, the predfined image is shown. If it’s not ticked, you could either show another image (add an ELSE clause) OR not show an image at all.
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!
🚨 The 2023 ACF Annual Survey closes tomorrow! This is your last chance to complete the survey and help guide the evolution of ACF. https://t.co/0cgr9ZFOJ5— Advanced Custom Fields (@wp_acf) May 18, 2023
© 2023 Advanced Custom Fields.