Hello I am having a problem, I not find anything related.
If I have a subgroup with Group enabled to clone, I can not use the max_cloner. (The button clone the main group disappears)
If I do not have a Subgroup and use max_cloner works perfectly.
add_filter( 'rwmb_meta_boxes', 'demo_nested_groups' );
function demo_nested_groups( $meta_boxes ) {
$meta_boxes[] = array(
'title' => __( 'Multi-level nested groups', 'textdomain' ),
'fields' => array(
array(
'id' => 'group',
'type' => 'group',
'clone' => true,
'max_clone' => 5,
'fields' => array(
// Normal field (cloned)
array(
'name' => __( 'Text', 'textdomain' ),
'id' => 'text',
'type' => 'text',
'clone' => true,
),
// Nested group level 2
array(
'name' => __( 'Sub group', 'textdomain' ),
'id' => 'sub_group',
'type' => 'group',
'clone' => true,
'fields' => array(
// Normal field (cloned)
array(
'name' => __( 'Sub text', 'textdomain' ),
'id' => 'sub_text',
'type' => 'text',
'clone' => true,
),
),
),
),
),
),
);
return $meta_boxes;
}