ZF 1.12 Zend_Form won´t display Form_Elements error messages without default 'Form' decorator, how come?

314 views Asked by At

I stumbled on to a problem similar to this (if not to say the same). At first I only had set my form decorator to be my custom ViewScript where I displayed my elements, very simple and straight. But when time came to "submit", no errors showed even though I clearly set errors in the inputs.

In order for my messages to display (in order for my form to actually get the messages, because

$this->element->element_name->getMessages()

was giving me nothing) I had to add the default 'Form' decorator to my Form's decorators, ending up with two: the custom ViewScript and the Form.

I tried looking through the code of 'Form' decorator, but couldn´t pinpoint why this was happening. I was wondering if anyone knew, because I'd like to learn.

Thanks!

1

There are 1 answers

1
liyakat On

Here is very useful document to trace and solve your error.

i think this LINK would be very useful to you to make things working at your end. just read and try to understand carefully

let me know if i can help you more.