Hi,

I'm having great success with the new Form framework, except for the
CollectionType.  My issue is that the errors are rendering for the
form {{ form_errors(form) }} and not the individual rows.

My Types:

class SpotResponseType extends AbstractType
{
    public function buildForm(FormBuilder $b, array $options)
    {
        // add the product involvement
        $b->add('items', 'collection', array(
            'type' => new SpotResponseItemType()
        ));
    }
}

class SpotResponseItemType extends AbstractType
{
    public function buildForm(FormBuilder $b, array $options)
    {
        // add the product involvement
        $b->add('involvement', 'choice', array('choices' => Solar::
$involvementOptions));
        $b->add('priceImmediate', 'text');
        $b->add('priceDelivery', 'text');
    }
}

My twig template looks something like (i've ignored most of the HTML):

<form>
    {{ form_errors(form) }}
    {% for item in form.items %}
         {{ form_widget(item.involvement) }}
         {{ form_row(item.priceImmediate) }}
         {{ form_errors(item.priceImmediate) }}
         ...
    {% endfor %}
</form>

I updated all my vendors yesterday so I'm rolling with the latest
code.

-- 
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

Reply via email to