I’m clearly a newb here. Thanks for clarifying how to use the forum and my apologies for the misuse of the platform.
Its been two weeks with wix trying yo deliver on s client site and this is the most excited ive felt about learning javascript. That’s in store for me and il go as deep as I can.
As for this issue i can’t fatten the cow on the day of the feast. I need a huge favor, help please. By Watching videos and digging here l, here is what can achieve
Multiple Dropdown Filter
import wixData from ‘wix-data’ ;
//USE THIS LINE OF CODE FOR BUTTON ONCLICK
// export function searchButton_click_1(event) {
// search();
// }
$w . onReady (() => {
$w ( “#dropdown1, #dropdown2, #dropdown3” ). onChange ( function () {
search ();
});
});
function search () {
wixData . query ( "databaseID" )
. contains ( "fieldkey1" , String ( $w ( "#dropdown1" ). value ))
. and ( wixData . query ( "databaseID" ). contains ( "fieldkey2" , String ( $w ( "#dropdown2" ). value )))
. and ( wixData . query ( "databaseID" ). contains ( "fieldkey3" , String ( $w ( "#dropdown3" ). value )))
//--------- COPY AND PASTE FROM THE .and() TO THE NEXT LINE TO ADD CODE FOR MORE DROPDOWN
. find ()
. then ( results => {
$w ( "#repeater1" ). data = results . items ;
});
}
//Reset Filter
export function resetButton_click ( event ) {
$w ( "#dataset1" ). setFilter ( wixData . filter ())
$w ( "#dropdown1" ). value = **undefined** ;
$w ( "#dropdown2" ). value = **undefined** ;
$w ( "#dropdown3" ). value = **undefined** ;
}
I want to add the button that opens the results of the repeater or gallery of this code in another page.
I have looked at wixlocation.to and localstorage, but how do i ammend this code accordingly. Will take me months of reading, hence I’m here.
Already stumbled on the links yoj shared, but still wondering how i add all that to my code. Il appreciate any help on this.