Support

Account

Home Forums Add-ons Repeater Field Get $_POST['acf'] value of repeater field in post object Reply To: Get $_POST['acf'] value of repeater field in post object

  • You indicate by your code that you are working with $_POST[‘acf’] when a measurement is added.

    
    // get the client id
    $measurement_client_id = intval($_POST['acf']['field_5e147914518a6']);
    
    // get values from the client post
    // a field
    $some_value = get_field('some_field', $measurement_client_id);
    // a repeater
    if (have_rows('some_field', $measurement_client_id)) {
      while (have_rows('some_field', $measurement_client_id)) {
        the_row();
        $some_other_value = get_sub_field('some_sub_field');
      }
    }