I am using ModX 3.0.4 and am unable to get SimpleSearch to work correctly. The documentation shows a sample form which looks like the following:
<form class="simplesearch-search-form" action="[[~[[+landing]]]]" method="[[+method]]">
<fieldset>
<label for="[[+searchIndex]]">[[%simplesearch.search? &namespace=`simplesearch` &topic=`default`]]</label>
<input type="text" name="[[+searchIndex]]" id="[[+searchIndex]]" value="[[+searchValue]]" />
<input type="hidden" name="id" value="[[+landing]]" />
<input type="submit" value="[[%simplesearch.search? &namespace=`simplesearch` &topic=`default`]]" />
</fieldset>
</form>
If I use the above code, SimpleSearch works. However, I need my layout to look like the following:
<form role="search" class="pcg-search-form d-flex h-100 w-100" action="[[~[[+landing]]]]" method="[[+method]]">
<div class="big-search-header input-group">
<input class="form-control text-1" id="headerSearch" name="q" type="search" value="" placeholder="Type and press enter...">
<input type="hidden" name="id" value="[[+landing]]" />
<a href="#" class="header-nav-features-search-hide-icon"><i class="fas fa-times header-nav-top-icon"></i></a>
</div>
</form>
Try as I may, whatever I do, when I press enter it takes me to the home page instead of the search results page. What am I missing? My Snippet call looks like:
[[!SimpleSearchForm? &tpl=
pcgSearchForm &landing=
59]]