Support Forum
Support › Meta Box Group › Group repeater not working anymoreResolved
Hi,
Im having an odd problem where the custom field code i had created a while back were working fine and now has stopped working. Problem im facing is the fields are getting saved and im able to pull the data at the front end but the group repeater field values(field id question_text and question_description) disappears and shows blank fields as below...
https://i.imgur.com/Ya5U3Kg.png
Here is the code...
add_filter( 'rwmb_meta_boxes', 'meta_ape_test_2' );
function meta_ape_test_2( $meta_boxes ) {
$prefix = '';
$meta_boxes[] = array (
'title' => esc_html__( 'APE test 2', 'text-domain' ),
'id' => 'ape-test-2',
'post_types' => array(
0 => 'page',
),
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array (
'id' => $prefix . 'first_slide_text',
'type' => 'textarea',
'name' => esc_html__( 'First slide - text', 'text-domain' ),
'required' => 1,
),
array (
'id' => $prefix . 'last_slide_header_text',
'type' => 'textarea',
'name' => esc_html__( 'Last slide - header text', 'text-domain' ),
'required' => 1,
),
array (
'id' => $prefix . 'last_slide_above_questions_text',
'type' => 'textarea',
'name' => esc_html__( 'Last slide - above questions text', 'text-domain' ),
),
array (
'id' => $prefix . 'last_slide_below_questions_text',
'type' => 'textarea',
'name' => esc_html__( 'Last slide - below questions text', 'text-domain' ),
),
array (
'id' => $prefix . 'last_slide_bottom_green_button_text',
'type' => 'text',
'name' => esc_html__( 'Last slide - bottom green button text', 'text-domain' ),
),
array (
'id' => $prefix . 'last_slide_bottom_green_button_url',
'type' => 'url',
'name' => esc_html__( 'Last slide - bottom green button url', 'text-domain' ),
),
array (
'id' => $prefix . 'last_slide_form',
'type' => 'textarea',
'name' => esc_html__( 'Last slide - form', 'text-domain' ),
),
array (
'id' => $prefix . 'test_questions',
'type' => 'group',
'name' => esc_html__( 'Test Questions', 'text-domain' ),
'fields' => array(
array (
'id' => $prefix . 'question_text',
'type' => 'textarea',
'name' => esc_html__( 'Question text', 'text-domain' ),
'required' => 1,
),
array (
'id' => $prefix . 'question_description',
'type' => 'textarea',
'name' => esc_html__( 'Question description', 'text-domain' ),
'required' => 1,
),
),
'clone' => 1,
'sort_clone' => 1,
'default_state' => 'expanded',
),
),
'show' => array(
'relation' => 'AND',
'template' => array(
0 => 'page:take_the_adult_test2.php',
),
),
);
return $meta_boxes;
}
Thanks in advance,
ND
Problem is fixed. I had to just update the Metabox group plugin.
Thanks,
ND