Support Forum
Support › Meta Box Group › Cloned Group not saving on Update
My cloned group is not saving in the admin area with update or publish.
$meta_boxes[] = array(
'title' => __( 'Types of Care', 'rwmb' ),
'post_types' => array( 'hub' ),
'autosave' => true,
'fields' => array(
//group
array(
'id' => 'types-group',
'name' => __( 'Type of Care', 'rwmb' ),
'type' => 'group', // Group type
'clone' => true, // Can be cloned?
'fields' => array(
// Name
array(
'name' => __( 'Care Type', 'rwmb' ),
'id' => "{$prefix}typeTitle",
'type' => 'text',
),
array(
'name' => __( 'Sub Title', 'rwmb' ),
'id' => "{$prefix}subTitle",
'type' => 'text',
),
array(
'name' => __( 'Summary', 'rwmb' ),
'id' => "{$prefix}summary",
'type' => 'textarea',
),
//array(
//'name' => __( 'Links to Post:', 'rwmb' ),
//'id' => "{$prefix}postLink",
//'type' => 'post',
//),
array(
'name' => __( 'Button Label', 'rwmb' ),
'id' => "{$prefix}buttonLabel",
'type' => 'text',
),
),
),
),
);
// 3rd meta box
$meta_boxes[] = array(
'title' => __( 'Bottom Content', 'rwmb' ),
'post_types' => array( 'hub' ),
'fields' => array(
// TYPE OF SPEEDBUMP
array(
'name' => __( 'HeadlineBottom', 'rwmb' ),
'id' => "{$prefix}HeadlineBottom",
'type' => 'text',
),
array(
'name' => __( 'BottomContent', 'rwmb' ),
'id' => "{$prefix}BottomContent",
'type' => 'wysiwyg',
'desc' => __( 'A brief overview of the hub page', 'rwmb' ),
),
// Side Image
array(
'name' => __( 'Bottom Side Image', 'rwmb' ),
'id' => "{$prefix}BottomSideImage",
'desc' => __( 'Choose an image', 'rwmb' ),
'type' => 'image_advanced',
'max_file_uploads' => 1,
),
),
);
return $meta_boxes;
}
When I inspect the code of the cloned metabox... the 'name' property of all of the form inputs are set to the same name of the first form input field of the first Metabox
Hi Andy,
I've just checked your code and it works for me: http://prntscr.com/6cft18
Can you please check again?