How to implement data field with multiple items from a list

Hello Bubblers,

I am trying to create a function where a user can select multiple items from a drop down list and save it on their profile.

For example, if a user speaks two languages and wants to display it on their profile, I want them to be able to select them both from a drop down list and then for those values to be saved.

So far I have used a multidropdown add on by bubble.io to select the options. My data type is list of texts. I have a button with a simple workflow that saves the data into the field but when I press it multiple times I keep on getting repeated texts in my data field meaning that the same values come up in the multidropdown even when they have been cleared.

Is there a better way to do this?

I do not want to simply add a text input and get users to type their language as they will type the same language in multiple different ways so filtering will be harder.

Thank you

Firstly, I wouldn’t use Texts for this… an Option Set (or even a custom datatype) would make things much simpler and cleaner…

But in any case it sounds as though you’re not using ‘Set List’ in your make changes to a thing action, which is what you need to use for this.

2 Likes

hey @toshipanda101 ,

Adam is absolutely right. Option sets would be the best fit for this sort of thing. Also you should be using set list to update the field. There are two things you need to do to avoid duplicates:

  1. Make sure the multidropdown only shows options the user hasn’t added before:

  2. Since users can add items one by one or many at a time, everytime the button is clicked, the current value should be added to the user’s existing items, not replace them:

check it out;
Forums71122

Hope this helps :wave:

1 Like

Thank you very much for your help!

1 Like

I never knew what option sets were before, thank you very much for your help!

1 Like

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