Form helpers form_start
and form_end
are useful in twig:
{{ form_start(form) }}
{{ form_end(form) }}
I can customise some parameters like the method
or the action
. But I need to customise others parameters like the class
or add the form-enctype
.
Can I do it? Should i set up it into the FormType.php
?
Since now I simply try to add my customised value to the twig
function like below:
{{ form_start(form, {'class': 'myclass', 'action': 'myaction'}) }}
// fields...
{{ form_end(form, {'render_rest': true}) }}
But in this case, for example, the class
does not appear.