Skip to Content Skip to Menu

External module filter stopped working with CB country field as Query Drop Down

  • Oishiku
  • Oishiku
  • ONLINE
  • Posts: 22
  • Thanks: 6
  • Karma: 2
1 hour 11 minutes ago - 1 hour 10 minutes ago #344326 by Oishiku
Hello,

I am using Joomla 6 with Community Builder and have created a custom Joomla module containing an interactive country map.

When a country is selected, the module should open a Community Builder user list filtered by:

cb_address_country

The current field is a Query Drop Down (Single Select) and stores ISO2 values such as:

KE
US
JM

The field is published, searchable, and explicitly included in the list’s specified searchable fields.

Community Builder’s own search form works correctly. For example, selecting Kenya through the native search form returns only members whose stored value is KE.

An important detail is that the external filtering worked previously when Country was stored in a regular text field. We changed it to a Query Drop Down so that country values would remain standardized and could be filtered reliably over the long term.

Since making that change, the native Community Builder search still works, but the external module no longer applies the filter.

I have tested GET requests such as:

/member-directory?cb_address_country=KE

and:

/member-directory?searchmode=0&search=&limitstart=0&cb_address_country=KE

I also tested a POST request containing:

listid=4
limitstart=0
search=
cb_address_country=KE
[Joomla CSRF token]=1

In each case, the correct user list opens, but all members are displayed.

The native Community Builder form submits the same ISO2 country value by POST and filters correctly.

Could you please explain the supported way for an external Joomla module to reproduce this Community Builder user-list search? Is there something different about externally filtering a Query Drop Down field, or is an additional Community Builder search-state, security, session or hotlink-protection value required?

Thank you.

Joomla version: 6.1.2
Community Builder version: 
2.11.0+build.2026.05.04.17.01.28.8d34d7a6c
Last edit: 1 hour 10 minutes ago by Oishiku. Reason: Edit text

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 50607
  • Thanks: 8669
  • Karma: 1473
23 minutes ago #344327 by krileon
Is there any particular reason you're not using the built in module support for this? Create a module of type "Community Builder Online module" with the following.

Display Mode: User List
Userlist: YOUR_USERLIST_HERE
List Display Mode: Search Only

This will generate the search form for you in the same way that's done on the actual userlist to ensure everything is properly initialized.


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.

Moderators: beatnantkrileon
Powered by Kunena Forum