Skip to content

Commit

Permalink
exclude handled attributes from the general list
Browse files Browse the repository at this point in the history
  • Loading branch information
rossriley committed Nov 7, 2018
1 parent babba49 commit 24a636f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion templates/form/_form_theme.twig
Expand Up @@ -323,7 +323,12 @@ templates:
{%- else -%}
{% set form_method = "POST" %}
{%- endif -%}
<form name="{{ name }}" method="{{ form_method|lower }}"{% if action != '' %} action="{{ action }}"{% endif %}{% for attrname, attrvalue in attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}{% if multipart %} enctype="multipart/form-data"{% endif %}>
<form name="{{ name }}"
method="{{ form_method|lower }}"
{% if action != '' %} action="{{ action }}"{% endif %}
{% for attrname, attrvalue in attr if attrname not in ['name', 'method', 'enctype'] %} {{ attrname }}="{{ attrvalue }}"{% endfor %}
{% if multipart %} enctype="multipart/form-data"{% endif %}
>
{%- if form_method != method -%}
<input type="hidden" name="_method" value="{{ method }}" />
{%- endif -%}
Expand Down

0 comments on commit 24a636f

Please sign in to comment.