how to put a custom id to the helper form_start

1

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 .

>     
asked by Ali 28.08.2016 в 20:55
source

1 answer

0

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'}}) }}
    
answered by 28.08.2016 в 21:27