Support

Account

Home Forums ACF PRO Get next field value in foreach loop through field group Reply To: Get next field value in foreach loop through field group

  • You are using acf_get_fields() which is a function in ACF that gets the fields in a group. It is an internal ACF function that builds field groups. This function does not populate the field values.

    To get he values in an array you would need to use get_fields() then you would need to match up the values with the names

    
    $fields = acf_get_fields('204');
    $values = get_fields();
    // some time later to get a value for a field
    $value = $values[$field['name']];