Let's see if this makes sense. 1. I have code for a search which works. 2. Upon publishing the site (with no edits to the site) the relationships for my text / dropdown / search & reset buttons go haywire (like they are trying to relate to the collection listed on the page). 3. If I return and update each search field (and dissociate the collection...leaving it on 'choose' as an option) & publish...it will work till next time I publish the website. So, my issue is not the search itself (maybe). It is the automatic attempt at 'relationship' from the search fields that I created to the collection listed on the page upon publishing. Page: pci-foundation(.) org/studio-info/ Code Used: import wixData from 'wix-data'; $w('#resetButton').hide(); $w.onReady(function () { //TODO: write your page related code here... }); function search() { let title = $w('#input1').value; let programs = $w('#dropdown1').value; let status = $w('#dropdown2').value; $w("#dynamicDataset").setFilter( wixData.filter() .contains("title",title) .contains("programs",programs) .contains("status",status) ) $w('#resetButton').show(); $w('#resetButton').enable(); $w('#button7').hide(); } export function searchButton_click(event) { search(); } export function resetButton_click(event) { $w("#dynamicDataset").setFilter( wixData.filter()); $w('#dropdown1').value = undefined; $w('#dropdown2').value = undefined; $w('#input1').value = undefined; $w('#button7').show(); $w('#button7').enable(); $w('#resetButton').hide(); $w('#dropdown1').resetValidityIndication(); $w('#dropdown2').resetValidityIndication(); $w('#input1').resetValidityIndication(); } export function button7_click(event) { search(); }
top of page
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
bottom of page
If you read your console error, you will see that it is because .hide is not a function. This is becuase you are calling it outside of the page onReady.
$w('#resetButton').hide(); this is sitting below your import statement which is your first problem.
Fix this error first before you continue and that will potentially help you discover the issue.
The search can't function because you have an immediate error so there is no way to debug that yet. You must follow your errors first.
Hello, I just checked your site and the search does not seem to work at all and there are console errors.
I"m a little confused by the original question and what you are expecting to see on page load (page load looks fine as far as I can tell) please update the issue or let us know if you have found a resolution. thanks!