Looking for a sortable multiselect field plugin


#1

As the title says, I’m looking for a plugin for a sortable multiselect field. I know about this plugin which is a nice multiselect field. You can even search/filter the items. But the feature that is missing from that plugin is to be able to manually sort the selected items.

Coming from WordPress development where I used the awesome Advanced Custom Fields plugin I really miss their Relationship field:

This field allows you to filter/search items. Selected items is added to the right panel, where you can sort them as you like. It’s a clean and simple ui that’s easy to understand.

I have not found a Kirby plugin/field that resembles this sortable multiselect field. I haven’t even found a simple standalone js plugin with this ui and behavior. If there was one, I’m sure it would be kind of simple to convert it to a Kirby field.

A field like this is the single most wanted field for me. I’m not yet a that skilled Kirby developer to create a field like this myself. In the meantime, I’m asking you if anyone have seen a field like this for Kirby, or a standalone js plugin that could be converted into a Kirby plugin.


#2

I’m not aware of such a field. The closest you can get to that functionality with what we currently have is a combination of a structure field and the quickselect field.


#3

The @texnixe suggestion should work well for most sites.

An alternative would be to use for example the Engineer field with for the page field or the select field. It would not have search in this case, but you could select a page (options: pages) and use the engineer field to repeat the task.

If someone want to build a field specific for this, I think the list field by @timoetting could be a good start to build on.


#4

The Engineer field does not seem to work with the quick select field, otherwise I would have suggested it, but I tested it beforehand.


#5

You are probably right.

I’m working on a new version and it will have better support for plugin fields (among many other things).

One reason why a plugin field will not work (before saving it), is that the DOM has changed when adding a new DOM element and the plugin field is not aware of that change. Therefor I need to trigger the plugin field js in order for it to fully work.

I plan to support the best field plugins like Quickselect and Images by @thguenther .

Most plugins without js should work out of the box when the new version is released.


#6

If I can change something in these plugins myself, please let me know!


#7

I have been experimenting a little and have made a working prototype for a sortable multiselect field. It turned out it wasn’t that hard to create custom fields as soon as you understood the inner workings of the native Kirby fields.

I will release it on Github as soon it is ready. I need to clean up the code and polish the ui a bit first.


#8

I have published my sortable multiselect field now. Feel free to download and use:


#9

was working something myself, but this looks great! Going to give it a try today. Thanks :slight_smile: