Support

Account

Home Forums ACF PRO Default number of repeater rows Reply To: Default number of repeater rows

  • Let me know if you have any questions. There are some older answers to similar questions on the forums (and I answered some of them) but this has changed… loading a repeater has been pretty stable for a while

    
    add_filter('acf/load_value/name=repeater_field_name',  'preload_repeater_field_name', 10, 3);
    function preload_repeater_field_name($value, $post_id, $field) {
      // $value will === NUL for new post
      if ($value !== NULL) {
        return $value;
      }
      $value = array_fill(0, 20, array());
      return $value;
    }