Dear Ernest,
We have a search form with search box and a few taxonomies.
I want to show an error message when user clicks Search button (or presses Enter) if all of this are true: (form is empty)
– search box is empty
– no checkbox is selected
– no option is selected from any of the dropdowns
The see the current version:
Open https://hd.devsite.hu
Top right corner, the small magnifier icon will open the popup with ASP
Expected behaviour:
1. Open https://www.nigella.com
2. Click the magnifier icon in the top right corner
3. Leave the form empty
4. Click Search
5. An error message will appear just below the search box saying “Please enter a search term or select a filter.”
1. I have tried with asp_search_start Javascript hook, but i was unable to abort searching. Can it be done in that hook?
2. Is there any easy way to check from JS if the form is empty? If not, I can still solve with jQuery, the important question is the previous one
Thanks in advance