Facts :
- i have this search section over here .
- it works just fine i can multi search with this section by name and dropdown and date .
- this button over her its job to to clear the inputs (input.value = undefined) .
problem :
i can not search with one input , i have to fill all inputs so that results appear
i want that the user can search by name only or dropdown only or date only
and if the user want to multi search he can do it also
this is my code :
$w('#dataset1').setFilter(wixData.filter().eq("_owner", ii))
$w('#dataset2').setFilter(wixData.filter().eq("_owner", ii))
$w('#button16').onClick(() => {
$w('#image4').show()
setTimeout(() => { $w('#image4').hide() }, 750)
$w('#dataset1').setFilter(wixData.filter().eq("_owner", ii).eq("date", $w('#appdatePicker2').value).eq("doc", $w('#dropdown2').value).contains("patient", $w('#input2').value).or(wixData.filter().eq('phone', $w('#input2').value)))
$w('#dataset2').setFilter(wixData.filter().eq("_owner", ii).eq("date", $w('#appdatePicker2').value).eq("doc", $w('#dropdown2').value).contains("patient", $w('#input2').value).or(wixData.filter().eq('phone', $w('#input2').value)))
})
$w('#button17').onClick(() => {
$w('#image4').show()
setTimeout(() => { $w('#image4').hide() }, 750)
$w('#appdatePicker2').value = undefined
$w('#input2').value = undefined
$w('#dropdown2').value = undefined
$w('#dataset1').setFilter(wixData.filter().eq("_owner", ii))
$w('#dataset2').setFilter(wixData.filter().eq("_owner", ii))
})
any help will be appreciated
thanks for reading...
Hello!
First please when you write code name your elements better. Do not use default names like "button17"
Can you share the page with us if you can (link of this page to test it live and see the code)