Filter Dropdown List

I want to list a shop list on a page and create a dropdown filter by city of shops. How can i do. Please help me

1 Like

Hello Pratheepan

So I’m assuming you have a data set that contains at least two fields one for the shop and one for the country.

To show a list you can use a repeater or a table.

Follow the following hints to achieve that:

  1. you need to connect your list to the data set’s shops field

  2. add the countries you want to filter based of to the drop down, you can do that manually of using code where you will query the data base and find all the list of items and then get the unique countries and set form the drop down data then set it to it. or you can have a separate collection that contains the countries and just connect it to it.

  3. add on change event to the drop down, in this event get the value selected and set the list’s data set’s filter to it then refresh the data set.

Good Luck! I hope this helps

Massa


Thank you for the reply

Here is how i want my page exactly.

I create a database ( Database Name: photographers) with Name, Address, District, Image etc.
Now I want to filter this list by districts in drop down list. I connect the drop down list with photographers database and value to district. but its not work.

Hello

after you connect the value of the drop down you need to follow the following steps for it to work:

  1. add on change event to the drop down from properties panel

  2. get the value selected

  3. set the a filter on the data set connected to the repeater to this value
    check this thread out : https://www.wix.com/code/home/forum/community-discussion/repeater-dropdown-filter

now if connecting the drop down to value is the part that is not working then make sure of the data your connecting it to or test it by setting the values manually.

Good Luck!
Massa

same problem as above i want to filter the district and service drop down simultaneously but when i publish my site the repeater not showing please some one help me

https://www.catch-world.com/copy-of-example-5