Hi,
I'm trying to use meta-box to create an interface for data that will be returned by the REST API. I have the MB Rest API and Meta Box Group plugins installed.
I have the following definition for data fields:
add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
function your_prefix_function_name( $meta_boxes ) {
$prefix = '';
$meta_boxes[] = [
'title' => __( 'Nav page', 'your-text-domain' ),
'id' => 'nav-page',
'post_types' => ['page'],
'fields' => [
[
'name' => __( 'Group', 'your-text-domain' ),
'id' => $prefix . 'group_mja12hpcr0h',
'type' => 'group',
'clone' => true,
'fields' => [
[
'name' => __( 'Name', 'your-text-domain' ),
'id' => $prefix . 'name',
'type' => 'text',
],
[
'name' => __( 'Relative url', 'your-text-domain' ),
'id' => $prefix . 'url_b4fovvhcvnb',
'type' => 'text',
],
[
'name' => __( 'Icon', 'your-text-domain' ),
'id' => $prefix . 'icon_fa',
'type' => 'text',
],
],
],
],
];
return $meta_boxes;
}
After adding data to a couple of these groups, in the REST response I only see this:
"meta_box": {
"group_mja12hpcr0h": []
},
How do I get this to work?