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

DepDrop not working when select2 parent is multiple selection #362

Open
Anitnelav opened this issue Jun 1, 2018 · 0 comments
Open

DepDrop not working when select2 parent is multiple selection #362

Anitnelav opened this issue Jun 1, 2018 · 0 comments

Comments

@Anitnelav
Copy link

Anitnelav commented Jun 1, 2018

Hi,
I've some problem using depDrop widget when in depends on a select with multiple enabled.

Someone have encuntered this problem? Some idea how to resolve it?
Here is my view code:

`echo $form->field($model, 'interessed_area')->widget(Select2::className(), [
'data' => ArrayHelper::map(AreeInteresse::find()->all(), 'id', 'name'),
'options' => ['placeholder' => 'Seleziona...', 'multiple'=>'multiple', 'id' => 'interessed_area'],
'pluginOptions' => [
'allowClear' => true
],
'theme' => Select2::THEME_BOOTSTRAP,
]);

echo $form->field($model, 'profiles')->widget(DepDrop::classname(), [
'options' => ['id' => 'profiles',
'multiple'=>'multiple',
'class'=>'chosen-select input-md required',],
'data' => ArrayHelper::map(ProfiliDisciplinari::find()->where(['areainteresse' => $model->interessed_area])->all(), 'id', 'name'),
'pluginOptions' => [
'depends' => ['interessed_area'],
'placeholder' => 'Seleziona almeno un area di interesse...',
'url' => Url::to(['/api/profili-disciplinaris/profili-disciplinari']),
'params' => ['10']
],
])
`

Thanks for your time!


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

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