How can I add a plugin to the registry while using a Zend_Form?
- by Mallika Iyer
I have a zend form that I'm initializing as follows:
$form = new Form_XYZ();
I have a display group in that form, which I'm calling like this:
$form->addDisplayGroup($generalSettingsGroup,
'general',
array(
'legend' => 'General',
'disableDefaultDecorators' => true,
'decorators' => array(
'FormElements',
'FieldSet',
array('HtmlTag',
array('tag' => 'div', 'class' => 'general')
)
)
)
);
I get this error :
ArrayObject Object
(
[exception] => Zend_Loader_PluginLoader_Exception Object
(
[message:protected] => Plugin by name 'FieldSet' was not found in the registry; used paths:Zend_Form_Decorator_: Zend/Form/Decorator/
[string:private] =>
[code:protected] => 0
[file:protected] => /usr/share/pear/PEAR/Zend/Loader/PluginLoader.php
[line:protected] => 406
[trace:private] => Array
...................
How can I add the FieldSet plugin to the registry? I'm using the default Zend_Form Fieldset decorator.