I'm writing a news module and each news can have multiple categories. using your widget, a user can select multiple categories from the list.
code is like this:
It's working fine in create scenario, but in update I expected it to show values that user has already selected. it only shows the first one. from reading original selectize.jsdocuments I noticed that I should set the items option of plugin. I did it by adding the following line:
It's okay now, but isn't it something the widget should do by itself? because that's what an active form is about. or am I missing something?
Thanks for great work btw.
Please try new version, it use separated widgets for text inputs and dropdown lists. It also support selected items automatically by using SelectizeDropDownList::$items.
I'm writing a news module and each news can have multiple categories. using your widget, a user can select multiple categories from the list. code is like this:
It's working fine in create scenario, but in update I expected it to show values that user has already selected. it only shows the first one. from reading original
selectize.js
documents I noticed that I should set theitems
option of plugin. I did it by adding the following line:It's okay now, but isn't it something the widget should do by itself? because that's what an active form is about. or am I missing something? Thanks for great work btw.