# Choose Video with 2 dropdowns

**URL:** <https://forum.wixstudio.com/t/choose-video-with-2-dropdowns/40532>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [May 29, 2018, 3:56am UTC](https://forum.wixstudio.com/t/choose-video-with-2-dropdowns/40532 "2018-05-29T03:56:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jackshelton1](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/jackshelton1/32/4323_2.png) [@jackshelton1](https://forum.wixstudio.com/u/jackshelton1)\
**Post date:** [May 29, 2018, 3:56am UTC](https://forum.wixstudio.com/t/choose-video-with-2-dropdowns/40532/1 "2018-05-29T03:56:38Z")

</div>

I have a page on which a video lesson is chosen by using to dropdown menus. The first dropdown menu filters the options by category, and the second dropdown menu presents the titles of the videos that are available based on the filter from the first menu.

I’ve got the first menu figured out. The second menu has been populated from the database. However, I can’t figure out how to get the second dropdown menu to work. Now I’m guessing I need to have an onChange function to get the correct video to load on the page. Can someone please help?

export function filterInput\_change(event, $w) {  
$w(“#dataset1”).setFilter(wixData.filter()  
.contains(“module”, $w(“#filterInput”).value));

```
} 

```

export function dropdown1\_change(event, $w) {

//Add your code for this event here:  
}

---

<div class="post-metadata">

**Author:** ![\_tal](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/_tal/32/669_2.png) [@\_tal](https://forum.wixstudio.com/u/_tal)\
**Post date:** [May 31, 2018, 12:37pm UTC](https://forum.wixstudio.com/t/choose-video-with-2-dropdowns/40532/2 "2018-05-31T12:37:46Z")

</div>

Hi,  
I would use the regular [Array.filter function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) to filter the relevant records instead of using the **setFilter** option. It’s a similar case to [this thread](https://www.wix.com/code/home/forum/questions-answers/searching-from-table) (the **filterTable** function). On this thread, she wanted to change the table rows based on the dropdown user inputs added to the page. Instead of assigning the results to the table, you can assign the result to the [video element](http://www.wix.com/code/reference/$w.Video.html#videoUrl) .

Good luck,  
Tal.
