How to Add Multiple Parameters To URL From Same Option Group?

Hey guys,
I’ve got a list of services (Hiking, Swimming, Skydiving etc) as an option set . The user can filter out businesses using multiple selections via workflow but i want it in the URL for usability.

I’m trying to use Go-To-Page to send the data but it will only allow me to send 1 selection. Any different selections only overwrite the previous one instead of adding to it.

How can i do this? Thanks

If you’re talking about query parameters, you can have as many as you like (even with the same key), and bubble will read them all to a single string with comma delimitation…

If you’re using a ‘Go To Page’ action, then Bubble will only apply the last parameter for a given key… so use an ‘Open External Website’ action (or a link element), then you can define the URL (including whatever parameters you want to use) dynamically.

Hey Adam,
I’m still not seeing how i would add a list to the URL to filter from. How do i set it up to dynamically add a new service everytime? Are you able to provide an example?

Also, how would this take into account all the other filters that are used that arent a part of the option set?

Thanks

Obviously, your exact implementation will depend on what you’re trying to do…

But here’s a simple example of how to set and read multiple Option Set values from URL parameters…

Read Option Set From URL (bubbleapps.io)

What you do with the values once you’ve read them is up to you… but using them in search constraints for other searches is simple…

1 Like

Hey mate,
Thanks for that, that was helpful and pointing me in the right direction but i’m trying to add one at a time to the URL not all at once. Is this possible?

Yeah, just do the same thing, but add one parameter at a time instead of all at once (i.e. just add an extra &colour=colour to the existing URL)

In your example page you can only add one at a time or multiple at once. So i’m not sure how to build on that. Here’s my attempt but it isn’t working.
image

Us the initial reading of the URL data (in my example the RG) then add the newly selected option to that list.

Or… here’s another way to do it without using an ‘open external website’ action (which will be faster if you’re not navigating users to another page, as I’d originally assumed):

Read Option Set From URL 2 (bubbleapps.io)

1 Like

Pefect, worked like a charm mate, thank you. I took a look at the way your RG worked and tried to replicate it to filter a venue by services but it doesn’t seem to be working. Any idea what’s wrong with this?
image

Just bumping this mate, hope you can answer my previous question. Thanks

Maybe something like this: Multiple options in params

You can send the option sets directly to the URL, Bubble takes care of the rest:

What I’ve learned with option sets is that they are best filtered. So, on page load you can filter for the option sets that are present in the URL.

This topic was automatically closed after 70 days. New replies are no longer allowed.