Skip to content

Auto complete not working in third row #105

Description

@iranimij

I set up an autocomplete field type using the following example:
https://github.com/WebDevStudios/CMB2-Snippet-Library/blob/master/custom-field-types/autocomplete-field-type.php

Screenshot_2020-04-05 Add a New Post ‹ Old Realtybloc — WordPress

First when I click on the first row autocomplete is working successfully but at third row autocomplete is not working.

wordpress version : 5.4

my code :

$cmb = new_cmb2_box( array(
            'id' => 'autocomplete_test',
            'title' => __('Autocomplete Field Examples', 'autocomplete_cmb2'),
            'object_types' => array('post'),
        ) );

`

$cmb->add_field( array(
            'name' => __('Related Fruits', 'autocomplete_cmb2'),
            'desc' => __('Repeatable related fruits', 'autocomplete_cmb2'),
            'id' => $prefix.'related_fruits',
            'type' => 'autocomplete',
            'repeatable' => true,
            'repeatable_class' => 'related-fruits',
            'options' => array(
                array('value' => 1, 'name' => 'Apple'),
                array('value' => 2, 'name' => 'Orange'),
                array('value' => 3, 'name' => 'Grape'),
                array('value' => 4, 'name' => 'Grape1'),
                array('value' => 5, 'name' => 'Grape2'),
                array('value' => 6, 'name' => 'Grape3'),
                array('value' => 7, 'name' => 'Grape4'),
            )
        ) );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions