I'm doing a project in Symfony 2.6 and I need to put the value of id to helper form_start
, which only shows the default name .
I'm doing a project in Symfony 2.6 and I need to put the value of id to helper form_start
, which only shows the default name .
According to the official reference form_start renders the start tag of a form and the prototype of form_start is the following:
form_start (view, variables)
Therefore in variables you can pass the variable attr which allows you to incorporate attributes to the tag in particular.
It would be something like this:
{{ form_start(form,{'attr': {'id': 'tu_id'}}) }}