Support

Account

Home Forums Front-end Issues get_field_object() multiple values Reply To: get_field_object() multiple values

  • When you have a select field set to allow multiple selections then it will return an array here

    
    get_field('voyage_type_moto')
    

    so you need to check if the value is in the array

    
    $value = get_field('voyage_type_moto');
    
    ....
     
    <?php if (in_array('trip_moto_route', $value)) { 
    
    ....
    

    `