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

Typeahead Js: submit select value without buttons #14

Open
voskobovich opened this issue Aug 30, 2014 · 0 comments
Open

Typeahead Js: submit select value without buttons #14

voskobovich opened this issue Aug 30, 2014 · 0 comments

Comments

@voskobovich
Copy link

I need to send the key the selected value to the handler.
Here is my code:

echo \mcms\xeditable\XEditable::widget([
        'placement' => 'top',
        'showbuttons' => false,
        'type' => 'typeaheadjs',
        'pluginOptions' => [
            'value' => 'click',
            'typeahead' => [
                'remote' => \yii\helpers\Url::toRoute(['offers/offer-list']),
                'name' => 'country',
                'valueKey' =>'text',
                                'displayKey' => 'value'
            ],
        ]
    ]);

When selected, you need to display the value of the field - text and pressing of Enter to send to the handler value - key.

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

1 participant