Skip to content

Unable to properly save field with multiple inputs when repeated #116

@adamcapriola

Description

@adamcapriola

I've been working with the address field example and it appears that it is incompatible with the repeating option. Any data entered doesn't save properly and a new row is generated on each attempted save.

Pre-save:

screen shot 2014-12-12 at 1 51 19 pm

Post-save:

screen shot 2014-12-12 at 1 51 41 pm

Code (along with the address example):

add_filter( 'cmb2_meta_boxes', 'ac_metaboxes' );

function ac_metaboxes( array $meta_boxes ) {

    $meta_boxes['my_metabox'] = array(
        'id'            => 'my_metabox',
        'title'         => 'My Title',
        'object_types'  => array( 'post' ),
        'context'       => 'normal',
        'priority'      => 'high',
        'show_names'    => true,
        'fields'        => array(
            array(
                'name'       => 'Address',
                'id'         => 'address',
                'type'       => 'address',
                'repeatable' => true
            )
        )
    );

}

WordPress version: 4.0.1
CMB2 version: 2.0.0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions