views:

666

answers:

1

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"));
A: 

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

umpirsky