Does anyone has a clue how to make this filter page
Hi,
Can you be more specific ?
What do you try to achieve ?
Roi
A filter page where you can choose stuff such as date, age, school or something like that (that it looks for the best match) with everyrhing you want (all the filters)
How do you want to present the filtered results ?
Roi
In a gallery so that if you completed all your filters you will see your matches in a gallery (repeater)
Hi,
Create a click event to the submit button and use filter method.
Here is a sample function:
function onclick() {
const description = $w('#descriptionInputElement').value;
const numberOfStudents = $w('numberOfStudentsDropDown').value;
$w("#myDataset").setFilter( wixData.filter()
.contains("description", description)
.eq("numberOfStudents", numberOfStudents) );
$w('#myRepeater').show();
}
Don’t forget to set the repeater to hidden on load.
Good luck!
Roi
IT doesn’t works it says my function onclick is unused…
function onclick() {
const description = $w(‘#dropdown1’).value;
const numberOfStudents = $w(“#dropdown2”).value;
$w(“#dataset3”).setFilter( wixData.filter()
.contains(“prijs”, description)
.eq(“leeftijd”, numberOfStudents) );
$w('#gallery3').show();
}
Hi,
Looks like you didn’t define the onclick event on the element.
Click on the plus sign next to the “onClick:” and white the name on the function.
Roi
I already did that!
Can you share a screenshot of the code and the repeater’s properties panel ?
Roi