iSac wrote:
> 
> One way to get at this is:
> 
>     - subclass Zend_Form with MyApp_Form, use that as your base form
> class.
>     - in MyApp_Form override createElement to add the decorator
>     - create elements using $this->createElement('type', 'name'), rather
> than using the constructor.
> 
> MyApp_Form::createElement() would look something like this:
> 
> public function createElement($type, $name, $options = null)
> {  
>     $el = parent::createElement($type, $name, $options);
>     $el->addDecorator('MyDecorator');
>     return $el;
> }
> 
Thanks iSac. We did think of something similar, it just seems like something
that should be supported by default.
-- 
View this message in context: 
http://n4.nabble.com/How-to-set-the-default-decorators-for-form-elements-tp1290314p1311585.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to