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

Fix #191 Multi select and ajax #195

Closed
wants to merge 1 commit into from

Conversation

margori
Copy link

@margori margori commented Feb 8, 2017

Scope

This pull request includes a

  • Bug fix
  • New feature
  • Translation

Related Issues

Fix #191

@kartik-v
Copy link
Owner

kartik-v commented Aug 7, 2017

Not sure this is needed. Check #220.

@kartik-v kartik-v closed this Aug 7, 2017
@junaid-rahman
Copy link

No need of any changes,

The problem is with initValueText. Instead of passing an array of key value pair just pass an array of values, that will solve th issue

Example:
If your making multy select of countries with 'code => 'name' pair then the array of items will be
[ 'ind'=>'india', 'qta'=>'qatar', 'cha'=>'chaina', ... ]
So for the select2 widget initValueText you just pass the array of selected values.
if india and chaina are selected then the array should be
['india','chaina']

@margori
Copy link
Author

margori commented Jun 8, 2018

I think this change is required since in DB keys of the array are stored, not values.

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

Successfully merging this pull request may close these issues.

Problem in selecting multiple select value in a text box using Multi Select and ajax loading
3 participants