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.