Hi all. I feel like I am so close, but I lack the understanding to complete. Please help out.
I currently have a dropdown connected via code (below), now I need to use the results of the dropdown to populate a gallery.
From the media gallery field not image field (see snap)
For reasons, it needs to be code, not through the editor.
$w.onReady( function () {
}); import wixData from ‘wix-data’ ;
//code for dropdown
export function dropdown1_change(event) {
wixData.query( “Property” )
.contains( “title” , $w( “#dropdown1” ).value)
.find()
.then(res => {
$w( “#gallery1” ).items = res.items; < is this part correct?
});
}
// code to load results into gallery??? < I need this part
I have looked at the Items and properties page for the gallery API, I can’t understand it.
This is literally the first and only piece of code I need for the site and seemingly a question that has come up a million times but with no definitive answer.
Please…please… some code for me to copy and paste. I know there will be 4974587 others who would benefit.
Or at least add an example to the tutorial you have here, but for galleries, not tables or [repeaters.](repeaters.
Velo Tutorial: Adding Collection Data Search Functionality | Help Center | Wix.com)
[Velo Tutorial: Adding Collection Data Search Functionality | Help Center | Wix.com](repeaters.
Velo Tutorial: Adding Collection Data Search Functionality | Help Center | Wix.com)
Note: I am not using a wix pro gallery.
Dropdown reads titles, error I think because i have no code and/or incorrect code to put results into gallery.