2011/4/26 Vincent Lechemin <vincent.leche...@gmail.com>: >> {% if form.field.errors|length > 0 %} > When I do that, I get "Method "errors" for object > "Symfony\Component\Form\FormView" does not exist."
Oops, form.vars.errors, form.field.vars.errors etc. it has to be (like above). > I'm not using any object to populate the form, do I have to each time? How do you plan to validate your form then? Usually this is done using the validation constraints in the underlying object. If you want to work on plain arrays, this is possible but not documented yet and slightly more complicated. If you don't want to validate the form (like with a search form), you can pass an array with default values to create() instead of the object (or call setData() later manually). $form = $this->get('form.factory')->create('form', array( 'field' => 'value', ... )); Bernhard -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en