My Idea is very simple. I’m displaying a list of tutors using repeaters on my dynamic page. What I need is a filter, when user select in drop down button (field key=catdropdown) which category they are looking for, tutor’s associated with only those categories list on page.
What I have Done.
- Created a database(field key=tutordataset) for tutors which connects to dynamic page.
- Created a database for categories which include names of six categories such as arts, academics etc…
- In my tutor database added a column with field of reference(field key=catref), which refer to my category database.
Here is my code:
import wixData from ‘wix-data’;
$w.onReady ( function () {
}) ;
export function catdropdown_change(event) {
let searchcat = $w(“#catdropdown”).value;
$w(“#tutordataset”).setFilter(wixData.filter().contains(“catref”, searchcat));
}
Now even after writing this code,
I’m getting error in preview mode like : Included category field is not a reference field.
And when i change drop down menu nothing displays on the page. Need help with this.