我在symfony 3中有3种表单类型
PanneauType,它是所有下一个集合的父项
->add('faces', CollectionType::class, array(
'entry_type' => FacePanneauType::class,
'entry_options' => array('label' => false),
'allow_add' => true,
'allow_delete' => true,
))
FaceType
->add('agendas', CollectionType::class, array(
'entry_type' => AgendaType::class,
'entry_options' => array('label' => false),
'allow_add' => true,
'allow_delete' => true,
'attr' =>['class'=>'agendas']
))
AgendaType
->add('debut', null, ['attr'=>['class'=>'form-control']])
->add('fin', null, ['attr'=>['class'=>'form-control']])
如何在树枝中生成我的表单,添加和删除议程类型?
答案 0 :(得分:0)