Good evening. I am new to the Wix Coding. Could someone please tell me how to have more than one dropdowns to filter content in a database. I have figured out how to get the normal search and more advanced type of search to work. But I can for the life of me not get the dropdowns to populate the repeater.
Hello willemsejaco,
you can not get it to work, because it is a much more complex function as you perhaps expect. To achieve your aim, several coding-steps are needed.
So my suggestion would be —> DO ALL STEP BY STEP.
Can you send screenshots ? And tell us which fields in the database you want to filter ? (boolean, text, tags,…) ?
Have you already seen this video ? https://www.youtube.com/watch?v=QhMKnm1f6EU&t=1s
Can you send me a picture og the database please ?
And tell me if the video is, what you’re looking for.
This is exactly what I am looking for. I have been playing with some database test website. But got frustrated and deleted it since I cannot figure out the filtering using drop down and having them work together for search results. This is only my second client and he really want me to do the site and I am willing to learn. If anyone is willing to help?
If you have questions, just tell me. I try to help you, but I’m not the best developer (and my english isn’t very good).
I made a very complex filtersystem for our website, and bevore 2 weeks I hade no idea of programming. So if you have any questions for filters, just tell me, I spend over 60 hours in this the last 2 weeks
All you have to know how to work with filter you will find in the CORVID-REFERENCE-API, here …
https://www.wix.com/corvid/reference/wix-data/filter
You will find different ways of solution how to filter.
An example how a drop-down-filter works, you will also find here …
https://russian-dima.wixsite.com/meinewebsite/blank-3
Good luck and happy coding.
What is the website you have built? Would love to check it out.
What do you mean ? Do you want to see website i have already built?
I am new to Wix, so this is my first one…
https://russian-dima.wixsite.com/meinewebsite
A little helping site, which i am playing with.
I just get started 6-Month ago, so the future can come
If you want to know on which projects i am working on, you can visit my site and start a private conversation
I have check out your website and busy studying it. Thank you @russian-dima. I was asking for the website @Nick have done for examples aswell.
Oh sorry MISSUNDERSTANDING . Yeah you can visit it as often as you want, i always try to improve it (if i find the time) , that means we are getting better!
Actually working on my little Comment-Box-Tool, but this is OFF-TOPIC right now. You can see all on my page
See ya!
This is the website: https://www.emobilhotels.de/
It’s german and isn’t translated in english until yet.
Today or tomorrow comes a new filter system on the homepage. I hope you like it
Luckily my first Language is Afrikaans. So I might understand a lot on the website.
Guys check this website out as well for some coding stuff. https://www.wixcodebank.com/
Worum geht’s da nun genau? Elektoautos oder hotels, oder beides? xD
Godd luck with your Homepage. I like BW even if i am from NRW ^^
No luck guys. I can’t get this code figured out to build that website for the client. I have watched numerous videos and have read a lot of articles but still no joy.
Really? Still having problems?
Take a look at this example…
https://russian-dima.wixsite.com/meinewebsite/repeater-dropdown
All you will have to do to achieve your aim will be to put in a second FILTER into this code-snipet.
something like…
import wixData from 'wix-data';
$w.onReady(function () {load_Data()});
export function BTNsearch_click(event) {load_Data()}
function load_Data (parameter) {console.log("GO")
wixData.query("Companies")
.contains("Filter-1", $w('#dropdown1').value)
.contains("Filter-2", $w('#dropdown2').value)
.find()
.then( (results) => {
if(results.items.length > 0) {
let firstItem = results.items[0]; //see item below
console.log(results.items)
$w('#repeater1').data = results.items
$w("#repeater1").onItemReady( ($item, itemData, index) => {
$item("#pic").src = itemData.logo;
$item("#ID").text = itemData.title;
$item("#group").text = itemData.companyGroup;
$item("#title").text = itemData.companyName;
// $item("#image1").onClick( (event) => {} );
});
}
else { }
})
.catch( (err) => {
let errorMsg = err;
});
}
He could manage his issue with the help of this example…
By the way, in this example you will not need any dataset for it!
@russian-dima Es geht um Hotels, mit Ladestation für dein Elektroauto. Für Elektroautofahrer ist es ja wichtig zu wissen, in welchem Hotel sie ihr Auto laden können. Es ist glaube ich mal das wichtigste Kriterium, wäre ja schlecht wenn du in den Urlaub fährst, dein Auto fast leer ist und du nicht weist, wo du dein Auto laden kannst.
Translation:
It’s about hotels, with charging station for your electric car. For electric car drivers it is important to know in which hotel they can charge their car. I think it is the most important criterion, it would be bad if you go on vacation, your car is almost empty and you don’t know where to charge your car.