Support

Account

Home Forums Add-ons Repeater Field Populate Choices in Repeater Reply To: Populate Choices in Repeater

  • I tried your code but I get a fatal error, GetPostTypes() is not a function. What does this function do.

    I tried the following and it seems to be working as expected, the field key is for a select field in a repeater that I set up in some test fields.

    
    function page_for_post_type($field) {
      if(is_admin()) {
        $field['choices'] = array('choice 1','choice 2','choice 3');
      }
      return $field;
    }
    add_filter('acf/load_field/key=field_55edb28fac7a3', 'page_for_post_type');