I have a MyNameSpace_View_Helper_FormErrors Class which extends the standard FormErrors Class and sets the HTML for the ErrorMessage itself.
I have to give the errormessage container an id based on the name of the element for which the error is thrown.
<ul id='errormsg_$ELEMENTNAME'>
It seems the View_Helper_FormErrors has no “link” to the Element, so is there any way to get the name or object of the Element which throws the error ?
I will also have to overwrite Zend_Form_Decorator_Error to give the Element to the View Helper.
see Zend_Form_Decorator_Error line 60:
will change to:
Tanks to @venimus , without his answer i wouldnt have looked in the decorator 🙂