Substring Search in CB Query field - how to get this method

2 years 5 months ago #292461 by MMDoege
Hello,

is there a way to get elegant style of searching CB Auto Action offers (see attached screenshot)?
I'ld like to use this for Query Drop-down (multi-select) fields with CB core fields ajax enabled on user profile.
Currently I have two fields where cb_query_field gets updated on a cb_textfield by executing a "... LIKE '%[cb_textfield]%' " select request.
Operates well but is somewhat cumbersome and having some drawbacks.

Thank you.
Attachments:
2 years 5 months ago - 2 years 5 months ago #292473 by krileon
It's not an ajax search, but basically a filter on the options already rendered by that dropdown. So it may not work how you're wanting it (e.g. it's not going to dynamically update the options available based off what you filter to). Yes, it's possible to use that jQuery in profile edit, but it does not integrate with any other plugins at this time. So CB Conditional, etc.. may no longer work on those fields. At any rate it can be done using the below.

Global
Triggers: onBeforeRegisterFormDisplay, onBeforeUserProfileEditDisplay
Type: Code
User: Automatic
Access: Everybody
Action
Method: jQuery
Code:
$( 'select#FIELD_NAME' ).cbselect();
Plugins: cbselect

To apply to all select fieldtypes you'd use the below.

$( '.cbft_select select,.cbft_multiselect select,.cbft_queryselect select,.cbft_querymultiselect select' ).cbselect();


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
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 EST to 4:00 PM EST. 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.
2 years 3 months ago #293559 by bins
Following from a separate topic (pointing to here), where does

$( '.cbft_select select,.cbft_multiselect select,.cbft_queryselect select,.cbft_querymultiselect select' ).cbselect();

go? In the plugins box, instead of cbselect?
Moderators: beatnantkrileon
Time to create page: 0.375 seconds
Facebook Twitter Google LinkedIn