Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

Hide options in a CB Query based on selected options in a previoius CB Query

  • cpaschen
  • cpaschen
  • OFFLINE
  • Posts: 328
  • Thanks: 42
  • Karma: 9
8 years 3 months ago #285169 by cpaschen
It's been a while since I've used CB on any site. I have a new site that might work with CB but I need to check first.

If we have 2 CB Query fields, pulling their options both from the same table (and same query).

Question 1 - can we limit the number of options selectable (in a multi-select list) [i.e. 'select only 3']

Question 2 - if the user select 'Option1', 'Options2', and 'Option3' in the first CBQuery field, can we have those options disabled (or hidden or something) in the second CB Query field (so they can't select them again).

Specific application is that the user needs to select topics. First select is the '3 favorite topics'. Second select is '3 additional topics I am interested in'.

Is there a way to do that within CB, the CB Query field (and any other add-ins)?

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

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
8 years 3 months ago #285180 by nant

cpaschen wrote: It's been a while since I've used CB on any site. I have a new site that might work with CB but I need to check first.

If we have 2 CB Query fields, pulling their options both from the same table (and same query).

Question 1 - can we limit the number of options selectable (in a multi-select list) [i.e. 'select only 3']


Not with CB Query by itself and not dynamically.
You could use a CB Auto Action to check if more than 3 options were selected and then either keep the first three selected or display some error message.

Some coding might be needed in your auto action.

Question 2 - if the user select 'Option1', 'Options2', and 'Option3' in the first CBQuery field, can we have those options disabled (or hidden or something) in the second CB Query field (so they can't select them again).

Specific application is that the user needs to select topics. First select is the '3 favorite topics'. Second select is '3 additional topics I am interested in'.

Is there a way to do that within CB, the CB Query field (and any other add-ins)?


Yes the latest CB Query field plugin lets you do this - see our video tutorials for examples.

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

  • cpaschen
  • cpaschen
  • OFFLINE
  • Posts: 328
  • Thanks: 42
  • Karma: 9
8 years 3 months ago #285215 by cpaschen
I've reviewed the videos (thanks for mentioning that ... great videos); however, none of them appear to directly show this usecase (which I'm not surprised).

However, I've played around with the demo and it appears that I should be able to do this with either the queryValidations or conditionals (although the demo wouldn't actually let me save any query field queries :-( )
I'm trusting your original indication that this is possible.

However, I'm expecting that I will need some help when we go to implement this on the site.

In the past I've had developer level subscription, but can't afford that now.
If I get Professional subscription, will I get assistance in building these queries (and validations/conditionals)?
[I just want to make sure that I am able to actually build the solution as needed for the client]

Thanks.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48630
  • Thanks: 8307
  • Karma: 1446
8 years 3 months ago #285231 by krileon

save any query field queries

Yeah, we've blocked code saving on our demo site. Sorry, but we have to protect it. Good new is it sounds like you just need to condition the options which CB Conditional can do (you can test it with a regular select fieldtype to see how it works). The alternative is to chain 2 query fields together so the options update based off the last query fields value (another great option).

will I get assistance in building these queries (and validations/conditionals)?

Not likely, no level of subscription provides custom coding here, sorry. We can provide simple examples to the best of our ability, but we're not here to write customized code. See the below for details of exactly what our support means.

www.joomlapolis.com/help-us-help-you


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.

  • cpaschen
  • cpaschen
  • OFFLINE
  • Posts: 328
  • Thanks: 42
  • Karma: 9
8 years 3 months ago #285235 by cpaschen
Sorry, I wasn't clear.
I didn't mean specific code/query help, but things specific to CB ... like 'how do I include the value of Field1 in a query within Field2' type things.

Or better yet, is there any difference in the type of questions that I can ask when professional support vs developer support (similar to the above question)?

BTW ... we have agreed that we're going to go ahead with one of these, just trying to determine what we need (we don't need the extra extensions that come with the dev. subscription at this time).

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

  • cpaschen
  • cpaschen
  • OFFLINE
  • Posts: 328
  • Thanks: 42
  • Karma: 9
8 years 3 months ago #285251 by cpaschen
Can you just tell me if there is any difference in the 'type' of support help provided between professional and developer?

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

Moderators: beatnantkrileon
Powered by Kunena Forum