I have a form buildForm() function that looks like this:
public function buildForm(FormBuilder $builder, array $options)
{
$builder->add('interestingSports', 'entity', array(
'multiple' => true,
'expanded' => true,
'property' => 'name',
'class' => 'Foo\MyBundle\Entity\Sport',
));
}
This works fine, except the form just plops out a bunch of checkboxes with no <li>s or anything around them, and I want <li>s.
Does Symfony have a way for me to put each checkbox in an <li>?
The best and easiest way to display your checkboxes surrounded by
<li>tags is to customize your form rendering by displaying fields individually,