Support

Account

Home Forums General Issues list all values in select field Reply To: list all values in select field

  • Hi guys,

    This is something you can accomplish using get_field_object(...) function. get_field_object(...) will return a field object. You can get the choices using the following code:

    $field = get_field_object('select_field', 1);
    
    $choices = $field['choices'];
    
    foreach($choices as $choice):
    
    	echo $choice;
    
    endforeach;

    For more information on this, have a look at: http://www.advancedcustomfields.com/resources/get_field_object/