Possible to use the group select ui in a plugin?

I have a case where I want to be able filter actions in a plugin based on a users group membership. In the ui of the plugin I would like to use the auto complete and list limits of the existing ui for setting a users group membership. I could just use a list and hope the people get the names correct but I would like to do better than that.

Any thoughts? Thanks.

Anything is possible in a plugin :wink:

2 Likes

I will be honest I was hoping for an example of cribbing existing ui elements into a plugin.

  1. Find a page in core which is using that UI element
  2. Take a look at the handlebars template which creates that page
  3. Hope the element is created using a handlebars helper (it usually is)
  4. Use that helper in your plugin (occasionally also including some logic in the controller)
  5. Success
8 Likes