wonzbak wonzbak - 1 year ago 209
Twig Question

Id attribute on form tag symfony

I would like to define a id attribute on my symfony2 forms.

I've tried with this in my twig template:

{{ form_start(form, {'id': 'form_person_edit'}) }}

But it seems not working.

Answer Source

Have you tried attr?

{{ form_start(form, {'attr': {'id': 'form_person_edit'}}) }}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download