It works now;) Thanks a lot Christian scs
On Tue, Apr 6, 2010 at 2:49 PM, Christian Albrecht <[email protected]> wrote: > Hey, now i got the solution, the filters are applied only to elements > which are already attached to the form when setting Filters. > Greetings, > Christian >> >> >> On Tue, Apr 6, 2010 at 11:23 AM, Christian Albrecht >> >> >> >> >> >> <[email protected]> wrote: >> >> >> > Hi, >> >> >> > Does Foo have its own __construct() method? >> >> >> > Greetings, >> >> >> > Christian >> >> >> > >> >> >> >> Hello, >> >> >> >> I have a common form class extended from Zend_Form: >> >> >> >> class Default_Form_Common extends Zend_Form >> >> >> >> >> >> >> >> In function init() {} >> >> >> >> I use >> >> >> >> $this->setElementFilters(array('StringTrim', 'HtmlEntities')); >> >> >> >> to set trim and htmlentities filters for all elements created via >> >> >> >> this class. >> >> >> >> >> >> >> >> I use this form like below >> >> >> >> class Default_Form_Admin_Foo extends Default_Form_Common >> >> >> >> >> >> >> >> and there are elements in this class. >> >> >> >> However, the form Foo does not seem to apply the trim filter I set >> >> >> >> in the common form class. >> >> >> >> If I add >> >> >> >> //->addFilter('StringTrim') >> >> >> >> line to my Foo class elements, it applies the trim filter. But not >> >> >> >> the one set with setElementFilters >> >> >> >> >> >> >> >> Any suggestion? or something wrong in this implementation? >> >> >> >> >> >> >> >> Thanks >> >> >> >> scs > >
