Steps to reproduce the issue
- In Joomla 3 add or change a field of
type="templatestyle"
with multiple="true"
like this:
<field name="whateverName" type="templatestyle" default=""
label="Select whatever"
multiple="true"
description="">
</field>
- You get automatically a "chosened" field
- In Joomla 4 add or change a field of
type="templatestyle"
with multiple="true"
like this. Don't forget the layout
attribute that works as expected wit list
fields:
<field name="whateverName" type="templatestyle" default=""
label="Select whatever"
multiple="true"
layout="joomla.form.field.list-fancy-select"
description="">
</field>
- Field doesn't use the
fancy-select
feature. Multi selection needs STRG
.
Expected result
- Joomla 4 field should use fancy-select feature.
The problem seems to be that the
GroupedlistField
is not organized and split into layouts, but rather hardcoded in the field class. So the layout can't be easily overridden with the fancy-select alternative.For cleaner code and consistency with most other fields, the best solution would be to change the
GroupedlistField
implementation to a layout-based one. This needs some digging into the code, as there is hardcoded HTML in several places inside the class.But for the problem described here (how to make multi-select grouped lists fancier), maybe somebody knows another solution based on CSS classes or JS behaviour?