How can I add a plugin to the registry while using a Zend_Form?
Posted
by Mallika Iyer
on Stack Overflow
See other posts from Stack Overflow
or by Mallika Iyer
Published on 2010-04-27T18:22:33Z
Indexed on
2010/04/27
18:23 UTC
Read the original article
Hit count: 351
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.
© Stack Overflow or respective owner