Monthly Archives: March 2012

Zend Form element display in group for some element.

I am trying for some time to use a forms some element in a div.But fail again again. But,suddenly this post help me a lot. Thanks to Zend Form display groups decorators example

Here I used some form element create dynamically in controller. For this reason I use this kind of code

$form->addDisplayGroup(
                        $displayGroup, 'postfail', array('legend' => 'Gust Information')
                );
                $postfail = $form->getDisplayGroup('postfail')
                        ->setOrder(20);

                $postfail->setDecorators(array(
                    'FormElements',
                    'Fieldset',
                    array('HtmlTag', array('tag' => 'div', 'id' => 'gestData')),

                ));

Here $form is a form object.

%d bloggers like this: