[fw-general] Zend_Form validation messages are shown before submit
I managed to create a quite complex form. I had to play around with decorators and I guess this is where it went wrong. The form displays nice but on page load the validation messages are shown even though the user hasn't submitted anything yet! The form is not even filled in yet. What's worse is that after a form submit the validation messages are gone (even when they should be there). The world upside down. Do you know what has gone wrong? -- View this message in context: http://www.nabble.com/Zend_Form-validation-messages-are-shown-before-submit-tp20252211p20252211.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_Form validation messages are shown before submit
-- bytte [EMAIL PROTECTED] wrote (on Thursday, 30 October 2008, 11:00 AM -0700): I managed to create a quite complex form. I had to play around with decorators and I guess this is where it went wrong. The form displays nice but on page load the validation messages are shown even though the user hasn't submitted anything yet! The form is not even filled in yet. What's worse is that after a form submit the validation messages are gone (even when they should be there). The world upside down. Do you know what has gone wrong? You're calling isValid() prior to rendering. Don't (unless the form has already been submitted). -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/
Re: [fw-general] Zend_Form validation messages are shown before submit
Thanks a lot. Saved me a headache! bytte wrote: I managed to create a quite complex form. I had to play around with decorators and I guess this is where it went wrong. The form displays nice but on page load the validation messages are shown even though the user hasn't submitted anything yet! The form is not even filled in yet. What's worse is that after a form submit the validation messages are gone (even when they should be there). The world upside down. Do you know what has gone wrong? -- View this message in context: http://www.nabble.com/Zend_Form-validation-messages-are-shown-before-submit-tp20252211p20255323.html Sent from the Zend Framework mailing list archive at Nabble.com.