Support

Account

Home Forums General Issues Let users add to select field choices Reply To: Let users add to select field choices

  • If you make the field Required, then you can do away with the if statement completely <?php $manufacturer = get_field('manufacturer'); echo $manufacturer->name; ?>. Otherwise you can shorten the notation a bit like this: <?php $manufacturer = get_field('manufacturer'); if( $manufacturer ) echo $manufacturer->name; ?>. If you’re doing more than just echoing the name within the statement then stick in curly braces.