Hi,
Two settings storage_type
and table
have to be added under the meta box settings, not the field settings.
And the group is a field type, it has to be added under the field settings.
For example:
add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' );
function your_prefix_register_meta_boxes( $meta_boxes ) {
$meta_boxes[] = array(
'title' => 'Meta Box Title',
'post_types' => 'CPT',
'storage_type' => 'custom_table', // Important
'table' => 'my_custom_table', // Your custom table name
'fields' => array(
array(
'name' => 'Group', // Optional
'id' => 'group_id',
'type' => 'group',
// List of sub-fields
'fields' => array(
array(
'name' => 'Text',
'id' => 'text',
'type' => 'text',
),
// Other sub-fields here
),
),
),
);
return $meta_boxes;
}
Get more details on these documents
https://docs.metabox.io/extensions/mb-custom-table/#using-custom-tables
https://docs.metabox.io/extensions/meta-box-group/