Need help on coding search function. I get a “parsing error: unexpected token {”
import wixData from ‘wix-data’;
$w.onReady(function () {
//TODO: write your page related code here…
});
export function dropdown1_change(event) {
let searchBusinessProfessional = $w(" #dropdown1 “).value;
$w(” #dataset1 “).setFilter(wixData.filter().contains(“businessProfessional”, searchBusinessProfessional));
}
export function dropdown2_change(event) {
let filterStore = $w(” #dropdown2 “).value;
$w(” #dataset1 “).onReady( () => {
If (filterStore === “Georgia”) {
$w(” #dataset1 “).setFilter(wixData.filter().eq(“georgia”, true));
}
If (filterStore === “New York”) {
$w(” #dataset1 “).setFilter(wixData.filter().eq(“newYork”, true));
}
If (filterStore === “Florida”) {
$w(” #dataset1 “).setFilter(wixData.filter().eq(“florida”, true));
}
If (filterStore === “South Carolina”) {
$w(” #dataset1 ").setFilter(wixData.filter().eq(“southCarolina”, true));
}
}
)}
Can you format your code? e.g. place it in a code block? so much easier to read.
Btw, this should be in the community discussions section of this forum.
Heath H-M,
Thank you for responding to my inquiry. Truthfully I am not a programmer and only coding to get the functionality that I need for getting a Repeater to work of a Drop Down menu. Given that, can you please explain to me what “code block” is? I will gladly try to format it in that way
Thanks again
Leroy