symfony - 如何在 symfony 3 中将集合添加到集合表单中
问题描述
我在 symfony 3 中有 3 种表单类型
PanneauType,它是所有下一个集合的父级
->add('faces', CollectionType::class, array(
'entry_type' => FacePanneauType::class,
'entry_options' => array('label' => false),
'allow_add' => true,
'allow_delete' => true,
))
面型
->add('agendas', CollectionType::class, array(
'entry_type' => AgendaType::class,
'entry_options' => array('label' => false),
'allow_add' => true,
'allow_delete' => true,
'attr' =>['class'=>'agendas']
))
议程类型
->add('debut', null, ['attr'=>['class'=>'form-control']])
->add('fin', null, ['attr'=>['class'=>'form-control']])
如何在树枝中生成我的表单添加和删除议程类型?
解决方案
推荐阅读
- python-3.x - 每当我运行此代码时,我都会收到这种错误
- firebase - Firebase auth uid 不解释实际值
- javascript - 通过 PHP 处理 AJAX 数据数组 - 没有 $_POST 发生?
- c# - 我应该使方法虚拟还是抽象?
- javascript - 为什么不触发回调函数?
- java - 将多维数组顺时针旋转 90 度
- flutter - 使用 bloc 时 Streambuilder 快照未退出等待状态
- reactjs - 如何从 Next.js 中的 url 获取多个参数?
- python - pd.merge() 和 dataframe.merge() 之间的区别
- python - 根据重复的列值过滤数据框