Hey! I have a repeater that is linked to a database that is provided by user inputs via a wix forms. I used the video tutorial of a search feature that filters the repeater based on a user input. I followed the steps on the video and primarily used their based code and just changed the sources to fit my page. When i run it, the code doesn’t work, it does not do the search and the repeater doesn’t react to it.
Here is a quick video showing the atribute names, variables and a demonstration of it not working:
This is my code:
import wixData from ‘wix-data’ ;
$w ( ‘#resetButton’ ). hide ();
export function searchButton_click ( event ) {
search ();
}
function search ( ) {
wixData . query ( "enterContest03" )
. contains ( "firstName" , $w ( '#searchInput' ). value )
. or ( wixData . query ( "enterContest03" ). contains ( "respuestaCorta2" , $w ( '#searchInput' ). value ))
. find ()
. then ( results => { $w ( '#repeater1' ). data = results . items ;});
$w ( '#searchButton' ). hide ();
$w ( '#resetButton' ). show ();
$w ( '#resetButton' ). enable ();
}
export function resetButton_click ( event ) {
$w ( ‘#tendederoFormsDataset’ ). setFilter ( wixData . filter ());
$w ( ‘#searchInput’ ). value = undefined ;
$w ( ‘#searchButton’ ). show ();
$w ( ‘#searchButton’ ). enable ();
$w ( ‘#resetButton’ ). hide ();
}
Can a kind soul help me out? Im really struggling. Thanks in advance!