2008年7月31日星期四

Re: [fw-mvc] Problems with subForms

-- Axel Wüstemann <awu@qbus.de> wrote
(on Thursday, 31 July 2008, 07:36 AM -0700):
> > You need to clone the sub form in each iteration; otherwise, the same
> > object is used, so whichever sub form name is registered last wins. Try
> > this instead:
> >
> > foreach($aSessions as $aSession) {
> > $clone = clone $oSubForm;
> > $oForm->addSubForm($clone, 'session_'.$aSession['EVENT_ID']);
> > }
> >
>
> This works, but regardless things go wrong.

I was able to reproduce the issue. Basically, the name is updating, but
the id is not. I've put an issue in the tracker for this:

http://framework.zend.com/issues/browse/ZF-3819


--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

没有评论: