We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fce76a0 commit a379fe8Copy full SHA for a379fe8
Resources/views/Form/form_div_layout.html.twig
@@ -314,10 +314,10 @@
314
315
{%- block widget_attributes -%}
316
id="{{ id }}" name="{{ full_name }}"
317
- {%- if read_only and attr.readonly is not defined %} readonly="readonly"{% endif -%}
+ {%- if read_only %} readonly="readonly"{% endif -%}
318
{%- if disabled %} disabled="disabled"{% endif -%}
319
{%- if required %} required="required"{% endif -%}
320
- {%- for attrname, attrvalue in attr -%}
+ {%- for attrname, attrvalue in attr if 'readonly' != attrname or not read_only -%}
321
{{- " " -}}
322
{%- if attrname in ['placeholder', 'title'] -%}
323
{{- attrname }}="{{ attrvalue|trans({}, translation_domain) }}"
0 commit comments