You could simply use
It creates a modal field that display a list of users that you can filter by group by selecting the combo box on the top right of the modal window.
If you need a simple combo box and you don't mind having the user group hard-coded you can use
query="SELECT u.id , u.name FROM #__users as u inner join #__user_usergroup_map AS ugm ON ugm.user_id = u.id where ugm.group_id=8"
And replace 8 by the user group id of your choice.
The function of the filter attribut is not to filter the displayed values of the field. It's more of a cleaning function that process the input value after the form is submitted.
In this case it has little use as the 'user' field can only output a user id, but in a text field you could use the 'INT' filter to make sure the user enter a number.
The available values for the filter attribute are:
- INT: An integer,
- UINT: An unsigned integer,
- FLOAT: A floating point number,
- BOOLEAN: A boolean value,
- WORD: A string containing A-Z or underscores only (not case
- ALNUM: A string containing A-Z or 0-9 only (not case sensitive),
- CMD: A string containing A-Z, 0-9, underscores, periods or
hyphens (not case sensitive),
- BASE64: A string containing A-Z, 0-9, forward slashes, plus or
equals (not case sensitive),
- STRING: A fully decoded and sanitised string (default),
- HTML: A sanitised string,
- ARRAY: An array,
- PATH: A sanitised file path,
- USERNAME: Do not use (use an application specific filter),
- RAW: The raw string is returned with no filtering,
- unknown: An unknown filter will act like STRING. If the input is an array it will return an array of fully decoded and sanitised strings.
From the Joomla source code