-- macest <[email protected]> wrote (on Thursday, 10 May 2012, 08:43 AM -0700): > I know the new form stuff is almost ready but I'm currently using beta 3 with > the current forms and have an issue with the ViewScript decorator. > > I have registered custom view helpers with Zend\View\HelperLoader which > override a couple of the default ones (FormRadio and FormMultiCheckbox) and > they work fine when using the FormElements decorator. The problem arises > when using the ViewScript decorator, it seems to be using the default set of > view helpers, i.e. a new instance of Zend\View\HelperLoader instead of the > one registered in the DI.
How are you rendering the form and/or elements, exactly? You should be doing at least one of the following: * $form->setView($this) * $form->render($this) These ensure that the renderer is pushed down into the tree; otherwise, an instance will be lazy-loaded for you -- which would cause you to lose any configuration you previously had. -- Matthew Weier O'Phinney Project Lead | [email protected] Zend Framework | http://framework.zend.com/ PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected]
