We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 52563
    • 12 Posts
    I'm still getting familiar with modx. So far, I have not been able to find much information on multi select fields for forms. Right now, I'm using migx to create CMP's and have figured out how to nest one grid within another. That works fine for one to many relationships, but gets complicated when dealing with many to many relationships.

    Essentially, what I am trying to do is have a list of users related to my custom object. One of my object can have many users, and one user can be related to many objects. There will only be a few relations out of many of each, though. For example, I may have hundreds of objects and thousands of users, and the most users an object will have is maybe...20.

    I had originally setup a listbox-multiple field to select related users, however, when the list of users grows this will become impractical. I considered using a nested migx-config for this, but there would be additional complications with this.

    What would be ideal is an advanced multi-select, like the jquery select2 plugin. https://select2.github.io/examples.html

    Of course, jquery is not used in the manager and I would rather not include it just for this one small plugin.

    I have found out that ExtJs has a similar selectbox with typeahead. Here is an extra which implements it as a TV type. https://github.com/Jako/SuperBoxSelect

    This, however, just displays a list of resources, and has no way of defining the items in the list.

    I have modified the processor of it to return users instead of resources, but I hate to edit files, and the next update this will be overwritten.

    Does anyone know of an alternative solution? An extra similar to this one that allows custom values? An easy way to filter the items?

    Any help would be much appreciated.