Create Multiple Select dropdown / Reuse Categories Component

Hey, im working on a custom module. The Module generator works great. But I need a Multiple Select dropdown. I have no Idea how to reuse the Dolibarr component for this. To code somethin new would be easy but I dont think that this would be the “Dolibarr way”

I’ve seen a a Multiple Select in Products → Categories (using the module categories)

How can I reuse the categories component in a custom module?


multiselectarray() is what you are looking for.