-- Michael Scholl <[email protected]> wrote (on Wednesday, 15 April 2009, 10:32 PM +0200): > I run in a problem with a zend_form element and its decorator. > > Tried to use the element twice in one form, which is in general no > problem. > But decorators of this element getting lost while be rendered the second > time (one render call - no ajax!) > > Found this issue: http://framework.zend.com/issues/browse/ZF-4932 > > > One element wouldn't be such a problem, but I would need a couple of > elements to stay twice in my form. > So anybody with an idea, how to achieve that?
Well, the problem you'll run into is that you can't actually register the exact same element instance with the form more than once. If you want to use it multiple times, you'll need to clone it and use a different name for each instance. If you're doing that, and you've got some standard initialization (such as a particular set of decorators), it's best typically to create your own custom element, and then create discrete instances of that. -- Matthew Weier O'Phinney Project Lead | [email protected] Zend Framework | http://framework.zend.com/
