We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Trying to return saved values in the field on update scenario but nothing show. What I am doing is
public static function getAllSelectedCategoriesSelect2() { $categories = (new Query()) ->select(['page.id', 'pageLang.title']) ->from('page') ->leftJoin('pageLang', 'page.id=pageLang.page_id') ->rightJoin('attribute_category', 'page.id=attribute_category.category_id') ->where('pageLang.language=:lang',[':lang' => Yii::$app->language]) ->all(); return ArrayHelper::map($categories, 'id', 'title'); }
and passing the result to the value property of the widget like so
value
Select2::widget([ 'name' => 'categories', 'value' => Attribute::getAllSelectedCategoriesSelect2(), 'data' => Attribute::getAllCategoriesSelect2(), 'options' => [ 'multiple' => true, 'placeholder' => Yii::t('app', 'Select categories'), 'allowClear' => true ], 'pluginOptions' => [ 'tags' => true, ] ])
The result from this is empty field. What am I missing ? Thank you in advance!
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Trying to return saved values in the field on update scenario but nothing show. What I am doing is
and passing the result to the
value
property of the widget like soThe result from this is empty field. What am I missing ? Thank you in advance!
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: