Closed (fixed)
Project:
radix
Version:
5.0.11
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Sep 2023 at 19:04 UTC
Updated:
2 Oct 2023 at 13:09 UTC
Jump to comment: Most recent
The core form element template generates a class of the form 'form-type-XXXX'. Radix generates this class with the 'js- prefix, but not without. Other contrib modules, such as webform, rely on the element-type class without the 'js-' prefix.
My work-around is to just add that class in my subtheme:
form-element.html.twig:
{# Add form-type-webform-likert, for example #}
{% include "@radix/form/form-element.twig" with {
attributes: attributes.addClass('form-type-' ~ type|clean_class),
} %}
I'm also wondering why there aren't utility classes available to be merged in this template as I see elsewhere. Seems a bit inconsistent but maybe there's a reason. It would have been nicer to just say utility_classes: ['form-type-' ~ type|clean_class]
Comments
Comment #2
shreya_th commentedComment #3
shreya_th commentedComment #4
shubham_jain commentedHi, what needs to be done here. Can you please explain.
Comment #6
doxigo commentedHey there Dan, thanks a lot for bringing this up
I am in the process of improving/fixing issues of all components and making it SDC compatible with a lot more features, I can't get enough sponsored time from my company, but I'll see what I can do
pretty much close to having an alpha release soon, I added this fix to
5.1.xand will also do so for5.0.xAlso added the missing
utility_classesfeature