Skip to content

Commit a1bf369

Browse files
feature #50770 [TwigBridge] Allow to change element for form_help block (seb-jean)
This PR was merged into the 6.4 branch. Discussion ---------- [TwigBridge] Allow to change element for `form_help` block | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | License | MIT Currently, the element for the block `form_help` is a `div`. With this feature, we are free to change it Commits ------- e08f5444c1 Allows to change element for form_help block
2 parents 0f57f2e + 5122a41 commit a1bf369

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Resources/views/Form/form_div_layout.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,9 @@
329329
{% block form_help -%}
330330
{%- if help is not empty -%}
331331
{%- set help_attr = help_attr|merge({class: (help_attr.class|default('') ~ ' help-text')|trim}) -%}
332-
<div id="{{ id }}_help"{% with { attr: help_attr } %}{{ block('attributes') }}{% endwith %}>
332+
<{{ element|default('div') }} id="{{ id }}_help"{% with { attr: help_attr } %}{{ block('attributes') }}{% endwith %}>
333333
{{- block('form_help_content') -}}
334-
</div>
334+
</{{ element|default('div') }}>
335335
{%- endif -%}
336336
{%- endblock form_help %}
337337

0 commit comments

Comments
 (0)