CB Code Field

8 years 2 months ago #278655 by edmundcheong
CB Code Field was created by edmundcheong
By any chance, we can create a select2 field (select from a table with a DB) with this new CB Code Field?

I have seen the age calculation tutorial, can we have a simple tutorial in creating a select2 field using the CB Code Field? Or perhaps a reference on doing this?

Please Log in to join the conversation.

8 years 2 months ago - 8 years 2 months ago #278662 by krileon
Replied by krileon on topic CB Code Field
No, it has no storage. If you want select2 usage use a normal select fieldtype then use CB Auto Actions to execute the jQuery to make it a select2. See the below regarding this.

www.joomlapolis.com/forum/153-professional-member-support/232684-joomla-drop-down-menu-style-chnz-menu


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: edmundcheong

Please Log in to join the conversation.

8 years 2 months ago - 8 years 2 months ago #278678 by edmundcheong
Replied by edmundcheong on topic CB Code Field
Thanks kyle,

krileon wrote: No, it has no storage. If you want select2 usage use a normal select fieldtype


When you select field type, do you mean any of the single select/multiple selectfield type?

Meaning, if i want to auto complete from data in a table from a DB, i'll have to use the multiselect/single select query field and run the auto action?

Please Log in to join the conversation.

8 years 2 months ago #278681 by krileon
Replied by krileon on topic CB Code Field

do you mean any of the single select/multiple selectfield type?

Yes.

Meaning, if i want to auto complete from data in a table from a DB, i'll have to use the multiselect/single select query field and run the auto action?

That is an entirely different thing your asking. CB Auto Actions can't help with that. Converting it to a select2 will give it filtering at the least. You can have its options pulled from a database table using CB Query Field and its query select fieldtype. Then convert it to select2 using CB Auto Actions to allow filtering on the options. For database auto complete you need an entirely new fieldtype specifically designed for that as it needs to use a fields ajax endpoint.


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 to join the conversation.

8 years 2 months ago #278683 by edmundcheong
Replied by edmundcheong on topic CB Code Field

krileon wrote:

do you mean any of the single select/multiple selectfield type?

Yes.

Meaning, if i want to auto complete from data in a table from a DB, i'll have to use the multiselect/single select query field and run the auto action?

That is an entirely different thing your asking. CB Auto Actions can't help with that. Converting it to a select2 will give it filtering at the least. You can have its options pulled from a database table using CB Query Field and its query select fieldtype. Then convert it to select2 using CB Auto Actions to allow filtering on the options. For database auto complete you need an entirely new fieldtype specifically designed for that as it needs to use a fields ajax endpoint.


Okay, let me confirm your explanation..

Auto complete NOT with this method (select query type + auto action)..

Select2 is possible to pull the options from the database?

Okay, as for values option (values and label), select2 will perform filtering on the value or label and which does it store? I am assuming the value?

One last question, have you perform the select2 filtering with thousands of options? Perhaps 3000? How does it perform?

Please Log in to join the conversation.

8 years 2 months ago #278686 by krileon
Replied by krileon on topic CB Code Field

Okay, as for values option (values and label), select2 will perform filtering on the value or label and which does it store? I am assuming the value?

Stores and functions exactly like a select field. The only difference is visually it functions like a select2 with its filtering.

One last question, have you perform the select2 filtering with thousands of options? Perhaps 3000? How does it perform?

Probably very slow.

If you want to dynamically pull the options from the database based off your select2 filter you need to create an entirely new fieldtype plugin to handle that.


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.233 seconds