Support

Account

Home Forums Add-ons Repeater Field Display repeater subfield as a dropdown (label + value) Reply To: Display repeater subfield as a dropdown (label + value)

  • If you are trying to create a select field that matches the choices of the field in questions then you don’t need to get every post and loop over them, so there shouldn’t be a need for the query, just use get_field_object() using the field key

    
    $field = get_field_object('field_XXXXXXX');
    foreach ($field['choices'] as $value => $label) ..... etc