- Issue created by @rroose
- Assigned to Sourav_Paul
- Merge request !8695Issue #3459838: Prefix is shown before description → (Closed) created by Sourav_Paul
- Issue was unassigned.
- Status changed to Needs review
2 months ago 9:09am 8 July 2024 - 🇮🇳India Kanchan Bhogade
I've Tested MR 8695 on Drupal 10.3.x-dev
MR is applied Successfully...Testing steps:
- Create a Webform with the Webform module.
- Create a 'Number' element.
- Fill in the description.
- Fill in the prefix.
- Set 'Description display' to 'Before'.
- Save the element and view the form.
The Prefix is shown before the Number field instead of before the description.
Attaching SS for reference
RTBC+1Keeping "Needs review" for Code verification
- Status changed to Needs work
2 months ago 2:02pm 8 July 2024 - 🇺🇸United States smustgrave
MR should be against 11.x branch.
Also probably will need test coverage and definitely a change record.
Recommend steps are updated using just core without a contrib to make sure the bug isn't from contrib.
- Assigned to Sourav_Paul
- Merge request !8731Issue #3459838: Prefix is shown before description → (Open) created by Sourav_Paul
- Issue was unassigned.
- 🇮🇳India Akhil Babu Chengannur
- web/core/profiles/demo_umami/themes/umami/templates/classy/form/form-element.html.twig
- web/core/themes/stable9/templates/form/form-element.html.twig
- web/core/themes/starterkit_theme/templates/form/form-element.html.twig
All these core templates follow the same structure for prefix
{% if prefix is not empty %} <span class="field-prefix">{{ prefix }}</span> {% endif %} {% if description_display == 'before' and description.content %} <div{{ description.attributes }}> {{ description.content }} </div> {% endif %}
Shouldn't we update all of them. Or is it something that should be handled by the 'webform' module itself?
- 🇳🇱Netherlands rroose
I think we should. I see no valid reason or argument to put the prefix before the description, so it seems like a mistake or bug. The prefix is mostly used to indicate what value the user needs to enter, such as a currency.
- Status changed to Needs review
6 days ago 9:22am 2 September 2024 - Status changed to Needs work
6 days ago 2:42pm 2 September 2024 - 🇺🇸United States smustgrave
Was previously tagged for tests.
And if a template needs changed then all of them would have to be updated with a change record.
- Status changed to Needs review
5 days ago 12:18pm 3 September 2024 - Status changed to Needs work
5 days ago 12:41pm 3 September 2024 - 🇺🇸United States smustgrave
Also has anyone gone through the git history for when this was added to see if done on purpose?
- 🇮🇳India Sourav_Paul Kolkata
From a non-developer perspective, it's a bug as it feels no purpose to put the prefix before the description but, if we put the prefix below the description, it looks quite meaningful as the prefix is mostly used to indicate what value the user needs to enter.
I do appreciate with #13