I have the following simple search tag set up inside a partial
in EE 3.4.1
{exp:search:simple_form form_class="header-search" where="any" search_in="everywhere" channel="static|homepage|news_resources|case_studies"}
<input type="text" name="keywords" id="keywords" value="" placeholder="Search...">
<input type="submit" id="search-submit" name="submit" value="">
{/exp:search:simple_form}
Now, I have also tried to use the default example from the documentation, both my own and the example one simply does not work.
I have also tried just shoving the tag somewhere on the page outside of being a partial, same problem.
When the search button is clicked, it just refreshes the page and I can’t work out what the hell is going on.
You need to define those in the opening simple search tag, otherwise it doesn’t know where to go.
{exp:search:simple_form form_class="header-search" where="any" search_in="everywhere" channel="static|homepage|news_resources|case_studies" result_page="path to template" no_result_page="path to template"}
<input type="text" name="keywords" id="keywords" value="" placeholder="Search...">
<input type="submit" id="search-submit" name="submit" value="">
{/exp:search:simple_form}
I wonder if it’s losing the post data entirely, so the search tag never comes into play. I’ll see that with forms when say there’s a redirect to force www and it’s posting without it. The redirect catches it, you lose the post data in the redirect, and the page just basically refreshes.
Could that be the issue? If you’re not sure, you can link to the search and I’ll do a test and just watch what the headers are up to.
I don’t think it’s a bug in the module, but something odd is up.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.