I am working on a Symfony form where it must have a dropdown with checkboxes to select multiple values. However choice and entity input types have 'multiple' and 'expanded' attributes which cannot produce what I need. Shown below is my requirement.
Here's how my form is:
$form = $this->createFormBuilder()
->add('features', 'choice', array('choices'=>array('a','b','c'), 'multiple'=> true))
->getForm();
Above code produces an expanded dropdown with a multi select.