If you're using ChosenJS, which is the fancy select library that Joomla 3.x uses, then you'll need to manually instruct it to update the list, because it doesn't use any observers by default.
You can do this by using the following:
My question could be solved by the comments of mickmackusa and Sharky.
I have finally extended the JFormFieldGroupedList as follows:
defined('JPATH_PLATFORM') or die;
JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php'); //load fields helper
It is working with this one:
Even with the 'z' in liszt', I thought this must be a typo, but not!!!
I had the one which Marco mentioned tried earlier, but that one is not working, in my situation.
Why is that one of Marco has mentioned, not working? I see that one regularly in other ...
Thats because of the chosen.js - i had the same question a few weeks ago :
Update List field rendering after ajax update
For chosen you can call:
after you changed the options, this triggers the update.
Edit: in Joomla! V3.x and old version of chosen is used and the trigger is:
JDatabaseDriver::quoteName() is for quoting SQL identifiers. Use JDatabaseDriver:quote() to quote and escape strings.
$query->where($db->quoteName('element') . ' = ' . $db->quote('com_componentname'));
There are quite a few methods of Joomla's db driver that are not documented on the doc page. The API summary page for 3.8 is here
What you're looking for is the iterator.
$query = $db->getQuery(true);
First of all, do you actually need a where clause? Are you really trying to exclude any names? What are the actual exclusions you want?
If you don't mean to filter any names, then you can simply remove the WHERE clause in your query and have all the users/usernames.
Secondly, you can't pass such regular expressions in LIKE.
I bet your above query isn't ...
RSForms Pro is very powerful and can do this. There are a few steps to it. When you make your fields, you would auto-populate the available teams by using RSForms built in shortcode for the query. Then you actually post the data and grab it back.