Skip to Content Skip to Menu

Grup dropdown list

  • mett
  • mett
  • OFFLINE
  • Posts: 14
  • Thanks: 0
  • Karma: 0
12 years 3 months ago #204684 by mett
Grup dropdown list was created by mett
Hello,

It is possible to display a list of users belong to a specific Joomla group (id=19) in a dropdown list?

I tried this code in CB Query Field but no field appear in profile:
Code:
select a.name from jos_users a left join jos_user_usergroup_map b on a.id = b.user_id where a.block=0 and b.group_id = 19 order by a.name

Thank you

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
12 years 3 months ago #204688 by krileon
Replied by krileon on topic Re: Grup dropdown list
Not with anything we provide. I think there's a plugin that lets you build a dropdown list from a query, but I don't recall what it's called; please search.

CB Query Field can display the results of your query on profile (your query doesn't look correct), but it's not a functional field and is more like a delimiter field with its contents being your query result.


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.

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

  • mett
  • mett
  • OFFLINE
  • Posts: 14
  • Thanks: 0
  • Karma: 0
12 years 3 months ago - 12 years 3 months ago #204691 by mett
Replied by mett on topic Re: Grup dropdown list

krileon wrote: Not with anything we provide. I think there's a plugin that lets you build a dropdown list from a query, but I don't recall what it's called; please search.


Unfortunately, i already searched for info before posting this message and i couldn't find any helpful information.

There is any plan of making this kind of plugin in near future? Something "light", a database join which retrieve id for value and name for text and display info in a dropdown list (Fabrik style :) )


P.S.: What do you mean by "your query doesn't look correct"? I used it in phpmyadmin and i can get desired results.
Last edit: 12 years 3 months ago by mett.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
12 years 3 months ago - 12 years 3 months ago #204700 by krileon
Replied by krileon on topic Re: Grup dropdown list

There is any plan of making this kind of plugin in near future? Something "light", a database join which retrieve id for value and name for text and display info in a dropdown list (Fabrik style )

I've no plans to make such a plugin, but it should be doable when CB 2.0 comes out (hoping for beta by end of year).

P.S.: What do you mean by "your query doesn't look correct"? I used it in phpmyadmin and i can get desired results.

There's no escaping, you're using table prefix instead of #__, etc..
Code:
SELECT a.`name` FROM `#__users` AS a LEFT JOIN `#__user_usergroup_map` AS b ON a.`id` = b.`user_id` WHERE a.`block` = 0 AND b.`group_id` = 19 ORDER BY a.`name`

The above is escaped and replaced for proper Joomla/CB usage (e.g. in Query Field). Note this won't run in phpmyadmin because of #__, which is a feature in Joomla/CB to replace with the prefix automatically.


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.
Last edit: 12 years 3 months ago by krileon.

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

Moderators: beatnantkrileon
Powered by Kunena Forum