Support

Account

Home Forums General Issues Possible to show one field only if another field is in use Reply To: Possible to show one field only if another field is in use

  • if you talk about frontend, than place your code inside a if-loop like that:

    <?php 
    $custom_format = get_field('custom_format');
    if($custom_format == "option2"){
     if( get_field ('custom_infotext') ) : ?>;
      <p class="custominfo">
       <?php the_field('custom_infotext'); ?>
      </p>
     <?php endif; 
    }?>

    replace custom_format with your fieldname, and option2 with the value of option2