Forums

Dropdown with users with specific usergroup

plocher 19 Feb, 2019
Hello,
I use chronoforms 6
I would like to have a dropdown field with all users with usergroup = 10
I use Read Data, this works. I can choose the database table "#_users"
But now it shows all users. I need to filter them with usergorup = 10
Can you help we how to do the filtering settings?
Thanks a lot,
Pascale
Max_admin 19 Feb, 2019
Answer
2 Likes
Hi Pascale,

In the "Read data", add a new model, call it "UserGroup", then in the new area, select the "#_user_usergroup_map" table, set the relation type to "one matching record, foreign key in this table", set "Related to" to the model of the users table, set the "foreign key" to "user_id", go back to the "users" table area, set the "where conditions" to:
UserGroup.group_id:8
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
plocher 20 Feb, 2019
Hi Max,
Thanks a lot! It works.
best regards, Pascale
This topic is locked and no more replies can be posted.