Multiselect drop down

Hai friends,
Is it possible to add all options of multuselect dropdown using a button.

I have to add country list to multiselect drop down and user can select the countries. Its nearly 300 countries and user have to exclude few countries only. So once user press a button to “add all countrues” button then they can delete the unwanted countries. Other wise its difficult select huge number of countries.

Any one have solution?
Thanks in advance.

Hi @bentoj72,

Here’s how to do it:

  1. First, place the multidropdown inside of a group
  2. Then, on that group, set up a custom state called Pre-selected countries (or whatever you want to call it). Make sure to check the box that this state is a list..
  3. Then, set the default value of the MultiSelectDropdown to the state you just created:
  4. When the user clicks the Add all countries button, set up the following workflow:

So what you are doing here is that you are telling the MultiSelectDropdown to fill its default list with the value from the custom state. Since that state is empty on page load, it will show up as empty in the list to. When the user clicks the button, the state is populated with the full list of countries. The important step is that reset group doesn’t mean empty, it means reset to default value. Now that the state is populated, the multidropdown will load that list.


Thank you so much @petter great. :heart_eyes:

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