Hi, Thanks Ralph. Much appreciated. I ended up string the form in the registry, which seemed to work pretty well.
Thanks again, Will Ralph Schindler-2 wrote: > > _forward will return back to the Action Controller, but will actually > create a new instance of the action controller to utilize. > > At this point you have a couple of options: > > * use some sort of application registry to house your form object > > * use a static member of your ActionController class to store the form > object > > * refactor your actions such that common functionality can be found > inside protected _doSomeKindOfWOrk() methods that several actions can > call out to (this is probably the most ideal solution). You can have > different protected methods for different forms you need to process. > > hope that helps! > -ralph > > aSecondWill wrote: >> ok, thanks, >> >> "accessing the same instance of the form object" >> >> >> hmm. how do you do that? I tried making it a protected var and just >> creating >> it if it wasn't already, but the whole controller is re-instantiated on >> forward. >> >> is this even the correct way to do multiple forms on a page? seems like i >> must be missing something as this must be something people do all the >> time. >> >> >> >> >> Peter Warnock-2 wrote: >>> On Sun, Jul 26, 2009 at 8:36 PM, aSecondWill <[email protected]> >>> wrote: >>> >>>> If the form dosn't validate, how do i display the original page, with >>>> the >>>> form errors etc. >>> >>> _forward back to the original action and make sure you are accessing the >>> same instance of the form object, it contains the error stack after >>> calling >>> isValid. - pw >>> >>> >> > > -- View this message in context: http://www.nabble.com/Seperate-action-to-proccess-a-form-tp24673119p24731298.html Sent from the Zend Framework mailing list archive at Nabble.com.
