如何選擇多個實體?多選。 Symfony表格
我的Symfony表單代碼
->add('typeContact', 'entity', array(
'required'=>false,
'multiple' => true,
'expanded' => true,
'class' => 'App\MyBundle\Entity\TypeContact'
))
我得到這個結果,
但我想這種類型。
我怎樣才能得到這種類型。我嘗試expanded => false
。
任何人都可以幫忙嗎?
這是使用select2 - https://select2.github.io/ – Andrew