Max clone does not work if I have subgroup

Support MB Group Max clone does not work if I have subgroup

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3703
    Infolu OfficialInfolu Official
    Participant

    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;
    }
    #3710
    Anh TranAnh Tran
    Keymaster

    Thanks for reporting. I will check it.

    #3803
    Infolu OfficialInfolu Official
    Participant

    Hello any news on this?

    I realized that in the above example if I almentar the max clone 10 then he allows me to clone 5.

    #3806
    Anh TranAnh Tran
    Keymaster

    It's a JS bug and I have a little difficulty with it. I will let you know when it's fixed.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.