Zend Form and nested fieldsets/containers?

别等时光非礼了梦想. 提交于 2020-01-06 14:46:13

问题


I have a form. I have a single element that needs to be wrapped in a div or fieldset (for formatting). Then I have two groups of elements, including the above, that I want to wrap in a fieldset or div. I've managed to create two groups, but Zend Form seems to balk at letting me create a group containing a group. Should I be able to do this?

Here's a simple code example, assuming I have created elem1, elem2 and elem3.

$form->addDisplayGroup(array('elem1'), 'group1', array("legend" => "Wrapped element"));
$form->addDisplayGroup(array('group1', 'elem2', 'elem3'), 'group2', array("legend" => "All elements"));

回答1:


Nasted groups - nope :( but you can use subforms.



来源:https://stackoverflow.com/questions/1399334/zend-form-and-nested-fieldsets-containers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!