-- Jeffrey Sambells <[EMAIL PROTECTED]> wrote (on Wednesday, 02 April 2008, 04:47 PM -0400): > I've been following the advanced multi-page form idea in the > documentation: > > http://framework.zend.com/manual/en/zend.form.advanced.html#zend.form.advanced.multiPage > > and I have a few issues. > > First, because isVaild() is used on the form before it's rendered, even > before you've had a chance to fill out all pages, the first presentation > of the page is filled with error messages if you have the element Error > decorator on. Is there a way to check if a form isValid without > triggering the error decorators?
You may want to get a new instance of the new sub form you're displaying prior to displaying it in such a case. > Second, if a page of the form is valid with all null entries (all fields > are optional) then the form will be valid even if the form wasn't filled > out since isValid() will return true for all null fields. If a given sub form consists of only optional fields, probably the best idea is to simply check if you have all sub forms stored in the session; if so, then they've all passed validations. > Has anyone else had these problems? Multi-page forms are not *directly* supported at this time -- that example is for the adventurous. In the meantime, Jurrien Stutterheim has developed an action helper to make multi page forms easier, and has the proposal up on the wiki; you might want to check that out. -- Matthew Weier O'Phinney PHP Developer | [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
