enigma
enigma

Reputation: 493

Missing select box on sonata_type_model

I'm getting no rendering for the select box, when using this code:

$formMapper->add('studycourses', 'sonata_type_model', array('expanded' => false, 'multiple' => true);

This is what appears:

enter image description here

But when I do the same with 'expanded' => true I get the correct result:

enter image description here

I'm using Sonata Admin Bundle 2.2 and Symfony 2.3.

Upvotes: 2

Views: 896

Answers (1)

TautrimasPajarskas
TautrimasPajarskas

Reputation: 2796

I haven't seen Sonata Admin so support non expanded multiselect model field. However, I was able to achieve the same result using Select2 tag-like selecting behavior (Select2 implementing bundle) or using drop-down multiselect widget.

Upvotes: 0

Related Questions