Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeatable fields showing same field twice #472

Closed
sachittandukar opened this issue Oct 1, 2015 · 1 comment
Closed

Repeatable fields showing same field twice #472

sachittandukar opened this issue Oct 1, 2015 · 1 comment

Comments

@sachittandukar
Copy link

Group fields are showing twice in metabox. I have pasted code snippets and image below. Issue exists only on v2.1.1

            'fields'            => array(
                array(
                    'name'        => __( 'Features', '_mok' ),
                    'id'          => '_features_list',
                    'type'        => 'group',
                    'description' => __( 'Add feature', '_mok' ),
                    'options'     => array(
                        'add_button'    => __( 'Add More Features', '_mok' ),
                        'remove_button' => __( 'Remove Feature', '_mok' ),
                        'sortable'      => true
                    ),
                    'fields'      => array(
                        array(
                            'name' => 'Icon',
                            'id'   => '_feature_block_icon',
                            'type' => 'file'
                        ),
                        array(
                            'name'    => 'Heading',
                            'id'      => '_feature_block_heading',
                            'type'    => 'text',
                            'options' => array(
                                'wpautop'       => true,
                                'media_buttons' => false
                            )
                        ),
                        array(
                            'name'    => 'Content',
                            'id'      => '_feature_block_content',
                            'type'    => 'textarea',
                            'options' => array(
                                'wpautop'       => true,
                                'media_buttons' => false
                            )
                        ),
                        array(
                            'name' => 'Image',
                            'id'   => '_feature_block_image',
                            'type' => 'file'
                        )
                    )
                )
            )

field issue

@jtsternberg
Copy link
Member

Thanks for reporting. Released 2.1.2 to address, but please update your CMB2 configuration to use the new metabox and field registration API as demonstrated in the example-functions.php file. Using nested arrays is deprecated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants