Require at least 1 field before submit
-
My search form has a search and 2 taxonomy selects. I noticed it’s possible to submit the form without inputting any keywords or making any taxonomy selections which returns all posts without using my category or search templates (it’s using index.php). The URL when the blank form is submitted is ‘domain.com/?post_types=foxyshop_product’. I’d like to prevent the blank form submission if possible and if not, force my category template to be used. I don’t care which field they use; I just need something entered before submitting. Thanks in advance for any help!
[searchandfilter class=”shop-search” post_types=”foxyshop_product” fields=”search,foxyshop_categories,product_tag” order_dir=”,asc” order_by=”,id,name” hierarchical=”,1″ search_placeholder=”Description (optional)” submit_label=”Filter”]
- The topic ‘Require at least 1 field before submit’ is closed to new replies.