Forum Academy Marketplace Showcase Pricing Features

Plugin search server side like searchbox

Hello,

I was just wondering if anyone could point me into the right direction on how to build a plugin with the select2.org library that works like the bubble´s searchbox plugin, since it does server side search.

Hey @keith, I know you like challenges :stuck_out_tongue_winking_eye:. Any thing you can say about this? Thanks a lot man.

I´m quite lost at this point so any help is appreciated.

Thanks a lot to all and have a good day.

Hey @ryanck, if you’re familiar with building plugins, this library is fairly easy to support. You’d just include the css and js in the header section of an element plugin, configure your canvas in the initialize function, handle configuration/options in the update function, and then have an input handler etc.

I wouldn’t personally build a plugin with this particular library as it’s jQuery based. Surely there’s something with similar features built in modern JS.

My opposition to jQuery is basically religious, but I also haven’t spent a lot of time building plugins with actual in-page interface elements. However, perhaps there are other plugin builders who might find this interesting. I’d also be sort of surprised if there’s not already a plugin that implements this particular library…

1 Like

Hey @keith,

Thanks for your reply.

Not super savvy on jQuery since I only work a bit with JavaScript. Do you know any other solution out there? I don´t even know why to use that select2.org library but I´ve seen quite a lot people saying that it works really well so I decided to go for it. Any recommendations will be helpful.

My main concern is how to do server side query just like the searchbox from Bubble does. Since all the plugins I´ve seen here are client side.

I´ve seen that every time you type a character on the searchbox it makes an API call so in terms of privacy (we´re dealing with sensitive data), it´s perfect. But it lacks on some functionalities that library provides.

Any insights on server side querying of the Bubble´s database @keith?

Thanks a lot man, highly appreciate taking a look at this.

The reason for that is there’s no plugin API to that sort of feature. Community plugins cannot directly interact with the database. Only the Bubble programmer can send the results of a search into a plugin and all the plugin can do is work with that list that gets sent.

1 Like

Oh, so there is no way to have the same functionality as the searchbox has that is searching the database server side as you´re typing, with a custom built plugin?

Yep, that’s correct as far as I know. There are all sorts of things that Bubble-built components can do that plugins cannot, unfortunately.

1 Like

Oh man, we were so excited about building a plugin like that :frowning:.

Thanks a lot for all the information @keith. I think we came across some example of moving to an external backend where you can call an API and search server side.

Have a good day!

Yeah, that would seem to be the workaround in this particular case.

1 Like