0
有无论如何做一个分层复选框表单元素?Symfony2表格分层复选框
我有我的学说实体“税”,可以有一个家长。
而在一个表单中,我定义了这个引用税收的字段。
$builder->add('impuestos', 'entity', array(
'class' => 'MyBundle:Tax',
'label' => 'Taxes',
'multiple' => true,
'expanded' => true));
我在Google上看,看到Symfony文档和源代码,我无法确定如何以分层方式显示此字段。
我什么,我需要的是财产以后这样的:
[] Parent Tax 1
-- [] Child 1 of parent tax 1
-- [] Child 2 of parent tax 1
[] Parent Tax 2
-- [] Child 1 of parent tax 2
-- [] Child 2 of parent tax 2