What is the best way to implement a users' or cohorts' list in a plugin's form?
How can I pass the list to a form, what is the element or function?
I wait to a reply, thanks
For users list : I don t think is a good idea to have a drop-down with all the users in your form as it will cause performance issues to the limit of the page not being responsive.
I suggest you to use the 'user filter' moodle component mixed with your other form items. (see screen-shot of user filter from ../admin/user.php ). Search the code for: $ufiltering = new user_filtering('', '', array()); to see how you can use it.
Also this is a great resource on how to use forms: https://docs.moodle.org/dev/Form_API
Let us know!