I have built a clonable group like the following example from the docs:
https://docs.metabox.io/extensions/meta-box-group/#setting-default-group-values
The std values are being dynamically filled (creating about 8 group clones). I want the user to be able to change the data of each group and to reorder these clones, but not to add or delete any cloned groups.
I have been able to remove the 'add more' button by setting: 'max_clone' => 3
.
Is there a way to also get rid of the option to 'remove' clones?
Or is there another way to achieve what I want with metabox?
Example from the docs:
add_filter( 'rwmb_meta_boxes', function( $meta_boxes ) {
$meta_boxes[] = [
'title' => 'Test Meta Box',
'fields' => [
[
'type' => 'group',
'id' => 'group',
'name' => 'Group',
'clone' => true,
'collapsible' => true,
'group_title' => '{name}',
'fields' => [
[
'type' => 'text',
'id' => 'name',
'name' => 'Name',
],
[
'type' => 'email',
'id' => 'email',
'name' => 'Email',
],
],
'std' => [
// Value for the 1st clone
[
'name' => 'Name 1',
'email' => '[email protected]',
],
// Value for the 2nd clone
[
'name' => 'Name 2',
'email' => '[email protected]',
]
],
]
],
];
return $meta_boxes;
} );