I'm trying to render multiple select drop-downs. Here's my actual code I have the formType
$builder
/*->add('idRolInstitucion')
->add('idOfertaAcademica')
->add('idEstatus')*/
->add('idOfertaAcademica', EntityType::class, array(
'class' => 'AppBundle:OfertaAcademica',
'choice_label' => 'idSeccion',
'label' => 'Uc',
'expanded' => false,
'multiple' => false,
'query_builder' => function (EntityRepository $er) {
return $er->createQueryBuilder('u')
->orderBy('u.idMallaCurricularUc', 'ASC')
->innerJoin('u.idMallaCurricularUc', 'm', 'WITH', 'm.idTrayectoTramoModalidadTipoUc = ?2')
->where('u.idOfertaMallaCurricular = ?1') //que las uc conicidan con la malla del estado academico
->setParameters(array(
1 => $this->estado_academico->getIdOfertaMallaCurricular(),
2 => 1,
));
;},
'group_by' => 'idMallaCurricularUc.idUnidadCurricularVolumen.idUnidadCurricular.nombre'
))
;
and here's what I've achieved:
select dropdown with all the choices
I would like to have is a dropdown for each group or category. In case of the example I would like to have three dropdowns like this:
Bases del conocimeinto
<select>
<option>unica</option>
<option>otra</option>
</select>
<br>Pensamiento politico
<select>
<option>unica</option>
</select>
<br>Matematica
<select>
<option>unica</option>
</select>
Is it possible? I'm aware of the multiple and expanded true properties but they allow to choose both sections of the subjects and they can only be selected once per subject and with both false scenarios I can only select one subject with section.
if I set expanded to true to have radio buttons.... my code breaks and I can't find the solution either....
Thanks in advance for all the help I can get and sorry for my rusty English and for the mistake in the spellings. It is not my natural language.