George Mihaylov
George Mihaylov

Reputation: 281

Symfony2 Form is automatically generated even when form_widget not specified

I'm using Symfony2 and TWIG to render the form, there is only this code in the TWIG template and the Symfony is rendering all rows:

{{ form_start(form) }}
{{ form_end(form) }}

In my previous project in Symfony I was able to render each field like this:

{{ form_start(form) }}
{{ form_row(form.name) }}
{{ form_end(form) }}

Upvotes: 0

Views: 30

Answers (1)

Bogdan Kuštan
Bogdan Kuštan

Reputation: 5577

form_end outputs form_rest() if You do not set it to false (from documentation):

{{ form_end(form, {'render_rest': false}) }}

Upvotes: 2

Related Questions