Hi,
Great plugin - one thing I can’t figure out. How do get the “onchange” event and find the selected value? I tried “onfocus” - but then there is no “last id” value. I tried onblur - but then you have to click away - its not onchange of the value selected in the dropdwon.
What is the equivalent event of “onchange” - ie I am trying to make it to autobinding with an onchange event (like you would do with an input element and detecting the onchange event).
Hi @lindsay_knowcode
You need to use “Selectize item added” or “Item removed” Trigger.
In plugin, you always need to check related trigger and action that belong to this plugin. You cannot use the Bubble native Input value has changed for example
Hi @austinjlturner
If this is stuck in loading state, normally there’s a wrong setting somewhere. Feel free to send me a PM with Screenshot and I can help you
I’m working on a fix for the created item loop. Actually, it’s may be possible to fix that with conditionnal to check if the created item already exist in your DB.
For added item, it should not be a problem anymore. However, I found that in some case it’s not triggered, Can you share a screenshot of your settings in PM and I can have a look? Thanks
@Jici - i have a use case for grouping that i cant seem to figure out. It appears grouping is only supported using a standard field, but in my case, i have a nested (recursive) field that i would like to group by. For instance parent/child. So i have a menu table, that has a parent_menu field that relates back to itself. How would i group items by parent_menu. I tried grouping within the OSWA Selectize as it allows for dynamic lookups, however the grouping does not seem to work there.
New version
Very important, this new version contain breaking change. You are concerned if you allow create item and create item in your DB and by loop issue when creating item. You are also concerned if you expect your field to refresh automically the options list (for example, if you have a first dropdown that is used to filter the second dropdown option list).
Initially, the dropdown was refreshing automatically to add or remove any new options created in DB or according to a field change. This part was creating issue because it also trigger New item created event. So basically, when user was creating a new item, this trigger the event, you create a new item in DB, this create the event again… and loop start. To avoid this issue, I needed to remove the automically refreshing options list for now. If you was using this, you can now use the new action “Refresh Option List”. So the WF could look like: Dropdown A item is added, Refresh Option List dropdown B. If you plan to use it with Create item, please consider adding a step before Refresh option and after to set and unset a state and filter Create item event using this state.
If you have issue with loop when you allow to create new item and you create a new item DB. Here’s the workflow process. Trigger on item Created. Create a new item in DB and use the new state “Last value created”. Consider add a small delay, just to be sure the first step is processed correctly (500-1000ms is enough from my testing) and use the new action “Update option” You need to provide the unique id (following the initial setting you have put on dropdown) of the Step 1 created item and current and new value. Current value need to be the same one use in Step 1 (or State Last value created) and new value can be the same. (but if you wan’t to format the value differently, you can do it now. Example: all lowercase.)
Exemple of create item process: https://sandboxjc.bubbleapps.io/selectize2 @sean13@tomerlan5@austinjlturner
Create filter. You can now use a function that will return true or false to filter user input text to create a new item. Example: return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(input) will only allow use to create item if a valid email address is entered. return /^.{2,10}$/.test(input) will only accept input text length between 2 and 10 characters. return input.length >= 3 will ask user to type 3 or more characters to be able to create new item. Example on demo page.
I have renamed Reset item to Set selected Items
Consider OSWA Deprecated. Bubble seem to have fixed issue with Option set attribute fields. All options set attributes seem now available in the Original Selectize dropdown. Thanks @Bubble . If you are using it, the issue with group should be fixed now @tgraham
Thanks a lot to help improving this plugin
If you have any issue, please send me a PM
Sorry - one more question. How do you then iterate through the list of tags and associate each one with the artifact they’re related to? I.e. if I’m adding a new Post, and it has 3 Tags from the selectize plugin, how do I associate them with the Post?
Exactly. Dataset is one of my Database.
So you create a new thing and update the information for the option created by user using the unique_id (or any other value you have set as unique id).
The current and new value is the display setting. In most case I guess this will be the same, but I can see some case where it could be different. For example, you wan’t all the item created to be lowercase. You can use the bubble function to set it as lowercase when Create a new thing and update the new value with this new settiong