is it possible to create subform and displaygroup without fieldset on zend forms?
is it possible to create subform and displaygroup without fieldset on zend forms?
1.3k Views Asked by ulduz114 At
2
There are 2 best solutions below
0

Yes it is possible.
You can override the loadDefaultDecorators Zend_Form original method in your particular form like this:
public function loadDefaultDecorators() {
parent::loadDefaultDecorators();
// remove the 'fieldset' decorator from all subforms
$subforms = $this->getSubForms();
foreach($subforms as $subform) {
$subform->removeDecorator('Fieldset');
}
return $this;
}
This may be helpful when you load subforms dynamically, based on e.g a selected option from a select list. Hope this will help someone.
Why to do this?
This is helpful accessibility feature?
However, You may do this in many ways, e.g. subclassing
Zend_Form
and setting your own decorators, or usinggetDecorators()
,addDecorator()
setDecorators()
orremoveDecorator()
methods.