Have you tried: $this->setElementDecorators($defaultDecorators);
You should only need to call that once per form. -- Hector On Tue, Jan 26, 2010 at 12:07 PM, iSac <[email protected]> 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; > } > -- > View this message in context: > http://n4.nabble.com/How-to-set-the-default-decorators-for-form-elements-tp1290314p1310864.html > Sent from the Zend Framework mailing list archive at Nabble.com. >
