> Zend_Form::setOptions() delays the setElementDecorators() call to after > all other configuration, so that any elements set using configuration > will then be affected by it. There is no way to override it. Right, that's what I suspected.
> An easier approach is to define an array of default decorators you want > to use as an class property: > public $defaultElementDecorators = array(...); > Then, omit your elementDecorators declaration, and declare your > decorators for each element by referencing this property: > 'foo' => array( > 'decorators' => $this->defaultElementDecorators > ), I had considered this but I wondered if there was a better way to manage it without duplicating configuration on each element. If that's the most straight forward way to do it then great, that's how it shall be done :) Thanks for getting back to me so quickly. Jonathan. -- View this message in context: http://www.nabble.com/Zend_Form-global-decorators-overriding-per-element-decorators-when-using-array-of-options-to-construct-tp17105287p17109668.html Sent from the Zend Framework mailing list archive at Nabble.com.
