Support

Account

Home Forums General Issues Get ACF field values of related group (via Post Object) in functions.php Reply To: Get ACF field values of related group (via Post Object) in functions.php

  • See my last comment here https://support.advancedcustomfields.com/forums/topic/get-_postacf-value-of-repeater-field-in-post-object/#post-135228

    
    $measurement_client_id = intval($_POST['acf']['field_5e147914518a6']);
    $emails = array();
    
    if (have_rows('email_repeater', $measurement_client_id)) {
      while (have_rows('email_repeater', $measurement_client_id)) {
        the_row();
        $emails[] = get_sub_field('email_field');
      }
    }