And as we started about choice field, how to add @empty value into the entity type choice list. I need to be able to set the relation to NULL pointed.
Also, is it possible to render field manually, like: input type="text" name="correct[path]" value="{{ formView.field }}" Will the form handle the data or custom validator for this field? On Tue, Apr 26, 2011 at 3:37 PM, Bernhard Schussek <bschus...@gmail.com>wrote: > Hi Vincent, > > 2011/4/26 Vincent Lechemin <vincent.leche...@gmail.com>: > > In twig, how can I test if a field has an error? > > {% if form.field.errors|length > 0 %} > > > Is there a replacement to the data option with choice field type? It > > allowed to preset data. > > You have to set the correct data in your *object* which is used to > populate the form. > > $object->setProperty('default'); > > or > > private $property = 'default'; > > 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 > -- 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