Max clone of 1 and clone_empty_start issue

Support General Max clone of 1 and clone_empty_start issue

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #47459
    Nicholas CoxNicholas Cox
    Participant

    Hi

    When you are using a 'max_clone' => 1 and 'clone_empty_start' => true the field displays and is not hidden by default, if the max_clone is e.g. 2 or more then this is not an issue. I want to be able to have no field appear but a max of 1 and i cant get it to work using the latest version of the plugins. I have even tried adding a min_clone of 0 but no luck. Any ideas why?

    [
    	'type' => 'group',
    	'id'   => 'test',
    	'name' => 'test',
    	'group_title' => 'test',
    	'clone' => true,
    	'max_clone' => 1,								
    	'collapsible' => false,
    	'clone_empty_start' => true,
    	'add_button' => '+ Add',
    	'fields' => [
    		[
    			'type'  => 'text',
    			'name'  => 'example'
    			'id'    => 'example',
    			'required' => false,
    			'columns' => 6,
    		],
    	],
    ]

    thanks

    #47469
    PeterPeter
    Moderator

    Hello Nick,

    This issue has been fixed in this commit https://github.com/wpmetabox/meta-box/commit/263fd9a7f13e79dfdb57a3a6e1538b642f83246a
    it will be included in the next version of Meta Box.

    Thank you.

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