Skip to Content Skip to Menu

Dynamic pulldown

  • JosB
  • JosB
  • OFFLINE
  • Posts: 40
  • Thanks: 2
  • Karma: 0
10 years 5 months ago #245257 by JosB
Dynamic pulldown was created by JosB
Hi,

on registration i want to present a pulldown to the new user where he can select his agent / contact person. This agent however is also registered on our website and is assigned to the usergroup agents.

Is it possible to create a pulldown with all the users who are member of the usergroup agents?

Best regards, Jos

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 5 months ago #245274 by krileon
Replied by krileon on topic Dynamic pulldown
Yes, using CB Query Field you can create a Query Select fieldtype that pulls its select values from a database query. Your database query could be something like the below to pull a list of users.

Query:
Code:
SELECT u.`id`, u.`username` FROM `#__users` AS u INNER JOIN `#__user_usergroup_map` AS m ON m.`user_id` = u.`id` WHERE m.`group_id` = GROUP_ID_HERE
Value Column: id
Label Column: username

With the above you'd replace GROUP_ID_HERE with the actual id of the user group id.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: JosB

Please Log in or Create an account to join the conversation.

  • JosB
  • JosB
  • OFFLINE
  • Posts: 40
  • Thanks: 2
  • Karma: 0
10 years 5 months ago #245276 by JosB
Replied by JosB on topic Dynamic pulldown
Kyle,

thank you, i'm going to give this a try!

Best regards, Jos

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum