eXe
eXe

Reputation: 660

Zend 2 - Display Global Form Errormessages

Zend 2 latest

As i know i can set different errormessages to each zend-form element.

$oForm->get('myElement')->setMessages(array('My defined errormessage - for THIS one element'));

Is there a way to define a global error message into the form, which would be (for eg.) displayed at the top of the form, or do i have to insert this function by myself?

Upvotes: 0

Views: 61

Answers (1)

Unex
Unex

Reputation: 1757

You can use the flashMessenger helper of zf2. The full documentation on how to use it can be found here

Upvotes: 1

Related Questions