merged branch agiuliano/2.3 (PR #8585)

This PR was submitted for the 2.3 branch but it was merged into the master branch instead (closes #8585).

Discussion
----------

Print form name in form_start function

It'd be useful if form_start() prints the form's name.
This way if you want to test it in your page, you can catch the form by `$crawler->filter('form[name=my_form_name]')`

Commits
-------

221bc15 Print form name in form_start function
This commit is contained in:
Fabien Potencier 2013-07-26 11:50:34 +02:00
commit 3dec4dd2e6
1 changed files with 1 additions and 1 deletions

View File

@ -314,7 +314,7 @@
{% else %}
{% set form_method = "POST" %}
{% endif %}
<form method="{{ form_method|lower }}" action="{{ action }}"{% for attrname, attrvalue in attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}{% if multipart %} enctype="multipart/form-data"{% endif %}>
<form name="{{ form.vars.name }}" method="{{ form_method|lower }}" action="{{ action }}"{% for attrname, attrvalue in attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}{% if multipart %} enctype="multipart/form-data"{% endif %}>
{% if form_method != method %}
<input type="hidden" name="_method" value="{{ method }}" />
{% endif %}