By dcam on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
11.3.x
Introduced in version:
11.3.0
Issue links:
Description:
A form element's #field_prefix is intended to be displayed before and inline with the element in order to enable use cases such as displaying a currency symbol immediately before a number field. When the ability to display element descriptions before the element was added, it was mistakenly placed between the prefix and input.
This bug is now resolved for Core templates. If you have overridden the form-element.html.twig template, then you should update your template accordingly.
Before:
...
{% if prefix is not empty %}
<span class="field-prefix">{{ prefix }}</span>
{% endif %}
{% if description_display == 'before' and description.content %}
<div{{ description.attributes.addClass(description_classes) }}>
{{ description.content }}
</div>
{% endif %}
...
After:
...
{% if description_display == 'before' and description.content %}
<div{{ description.attributes.addClass(description_classes) }}>
{{ description.content }}
</div>
{% endif %}
{% if prefix is not empty %}
<span class="field-prefix">{{ prefix }}</span>
{% endif %}
...
Impacts:
Module developers
Themers