views:

19

answers:

1

I'm trying to get the standard error messages to show up in zend_form but they don't.

I have this:

if ($form->isValid($formData)) {
                // do stuff
            } else {
                $form->populate($formData);
                $this->view->form = $form;
            }

When I post an invalid form, the form does show up in the view like it's supposed to, but from the tutorials it seems like error messages should show up by default?

What am I missing?

Thank you for your help!

+1  A: 

The error messages are applied using Decorator Pattern. There are some Zend Form Element Decorators present in the form by default.

I guess you have overwritten the default decorators, using e.g. setDecorators().

takeshin
Yes!!! I have done just that having built the for from a tutorial. Can you point me to the "error code" decorators?
Joel
ah got them...simple as adding array('Errors');
Joel