No Code Attached Yet
avatar crystalenka
crystalenka
3 Jan 2022

Is your feature request related to a problem? Please describe.

For the custom field types 'list' and 'SQL', if multiple = true, we are shown a list in a box where to select multiple items you have to hold down CMD or CTRL.

This is hard for some people to understand and use, and seems terribly old-fashioned (web-wise).

Describe the solution you'd like

At a minimum, it would be nice if these fields rendered with the core fancy select list when multiple items are possible.

Additional context

For consistency, it could also be a better user experience to use the fancy select even when selecting one item; the default drop-down is cumbersome when there are many items and it would be nice to be able to type to find a specific item. This is consistent with the category selection in articles and in other places.

avatar crystalenka crystalenka - open - 3 Jan 2022
avatar joomla-cms-bot joomla-cms-bot - change - 3 Jan 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 3 Jan 2022
avatar nikosdion
nikosdion - comment - 3 Jan 2022

@laoneo Wanna take a look at this? This sounds like a reasonable way to implement it, possibly with an option in the field plugin.

avatar brianteeman
brianteeman - comment - 3 Jan 2022

I think there is already an open issue for this.

avatar laoneo
laoneo - comment - 3 Jan 2022

This would be a new option where the layout can be defined. The choices.js ones need the layout joomla.form.field.list-fancy-select.

avatar nikosdion
nikosdion - comment - 3 Jan 2022

If there was an option to define the layout I'd love it. I have several use cases on my site and the upcoming version of my Ticket System software where it'd made a hell of a lot more sense than the default layout. Would you have the time to do a PR? I can promise a test from both me and Crystal — each one of us has a different use case where we'd need it.

avatar crystalenka
crystalenka - comment - 3 Jan 2022

This would be a new option where the layout can be defined. The choices.js ones need the layout joomla.form.field.list-fancy-select.

Allowing the layout to be defined would be absolutely utterly MAGICAL and open so many doors for custom fields for advanced integrators. 😮

I think there is already an open issue for this.

I didn't see any, I did check!

avatar laoneo
laoneo - comment - 3 Jan 2022

If we call it layout, we get into a collision with #36265. So we need another wording as this is for the layout of the field for form rendering.

avatar crystalenka
crystalenka - comment - 3 Jan 2022

Maybe "Form Layout"?

avatar brianteeman
brianteeman - comment - 3 Jan 2022

There is an issue from @wilsonge that all fields needed to be converted to use layouts perhaps that is the one I was thinking of.

I know because I tried to do that and add support for fancy-field exactly as you request #34941. There was also another issue about creating layout overrides for fields #36046. It was something I needed as well but failed to create to fell back to adding the field in the xml instead of a custom field. There are still quite a lot of gaps between fields (and options) you can create in xml and the same in the custom fields component

avatar crystalenka
crystalenka - comment - 3 Jan 2022

I think that if someone is able to add the layout (form layout? Form render layout? Form field layout?) to custom fields it would go a long way in closing those gaps. I can just imagine the possibilities with custom subform layouts...

avatar brianteeman
brianteeman - comment - 3 Jan 2022

i agree 10000% but I tried myself and failed

avatar crystalenka
crystalenka - comment - 3 Jan 2022

I tried to take a look before opening the issue but couldn't make heads nor tails of where the layouts come from so it's sadly above my level too. :(

avatar laoneo
laoneo - comment - 3 Jan 2022

Feedback welcome on #36551.

@nikosdion You can do that already without any core changes on your custom fields. The logic of the pr #36551 can be applied to any custom field. Setting the layout must then be done in your plugin in the onCustomFieldsPrepareDom method override.

avatar richard67 richard67 - close - 3 Jan 2022
avatar richard67
richard67 - comment - 3 Jan 2022

Closing as having a pull request. Please test #36551 . Thanks in advance.

avatar richard67 richard67 - change - 3 Jan 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-01-03 18:46:12
Closed_By richard67

Add a Comment

Login with GitHub to post a comment