2008年9月30日星期二

Re: [fw-mvc] Zend_Form - Displaying Error Messages

I need to do this with one of my project as well. What I intend to do is to
disable the Errors decorator and then use the hasErrors, getErrors and/or
getMessages methods of Zend_Form to display the error messages above the
form.

I believe there is a method to disable just the Errors decorator but I'm
unable to find it at the moment. Of course you can remove the decorator on
individual elements with $element->removeDecorator('Errors').

If you haven't already read Matthew's form decorators article on DevZone, it
is highly recommended:

http://devzone.zend.com/article/3450-Decorators-with-Zend_Form

Hope that helps.


log2e wrote:
>
> Hi!
>
> I'm using Zend_Form and decorators for setting up my forms. Is there a way
> to group all error messages (from validators) at the top of the form
> instead
> of displaying them below each single input field?
>
> Thanks in advance.
>
> Stefan
>
>
>
>

--
View this message in context: http://www.nabble.com/Zend_Form---Displaying-Error-Messages-tp19740982p19741802.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: