I add the following field to my form:
->add('interessi_profilo', 'entity', array( 'label' => 'Interessi (Tr)', 'class' => 'MyProfiloBundle:TipoInteresse', 'required' => true, 'multiple' => true, 'expanded' => true, 'property' => 'tipo', 'query_builder' => function(\My\ProfiloBundle\Entity\TipoInteresseRepository $er) { return $er->createQueryBuilder('u') ->orderBy('u.id', 'ASC'); },
I would like the form to be submitted only if at least one checkbox is selected and, if possible, has a tooltip that tells the user: at least one option must be selected
Barno source share