@Sarah
To run this form requires a specific development (without change of AjaxSearch)
as a gift ... but not tested
Set up a snippet called for instance NewSearch:
<?php
// snippet used to wrap a specific call to AjaxSearch
$aslmt = isset($_POST['aslmt']) ? strip_tags($_POST['aslmt']) : 10;
$asrel = isset($_POST['asrel']) ? strip_tags($_POST['asrel']) : "order";
// init relevance
$relevance = ($asrel == 'order') ? '' : 'pagetitle:100,content';
// runs only with the non-ajax mode.
$params = array (
'ajaxSearch' => 0,
'showInputForm' => 0,
'grabMax' => $aslmt,
'order' => 'publishedon DESC',
'rank' => $relevance
);
return $modx->runSnippet('AjaxSearch', $params);
?>
Set up your form as below (not tested too!) - replace id=157 by the landing page id you want
<form id="ajaxSearch_form" action="index.php?id=157" method="post">
<fieldset>
<label>
<input id="ajaxSearch_input" class="cleardefault" name="search" value="Search here..." onfocus="this.value=(this.value=='Search here...')? '' : this.value ;" type="text">
</label>
<label>
<input id="ajaxSearch_submit" name="sub" value="Go!" type="submit">
</label>
<br><br>
<div>
<input name="asrel" value="rank" checked="checked" type="radio"><label for="rank">Sort by relevance</label>
<input name="asrel" value="order" type="radio"><label for="frdoc">Sort by date last modified</label>
<label>
<select name="aslmt">
<option>5</option>
<option selected="selected">10</option>
<option>20</option>
<option>50</option>
</select>
Number of results per page
</label>
</div>
</fieldset>
</form>
Then on your landing page (Here #157) adds [!NewSearch
? ¶m1=`value1` ¶m2=`value2`!]
where param1, param2, ... are classical ajaxSearch parameters. Don’t use &rank, &order or &grabMax to avoid a conflict with your NewSearch parameters.[EDIT] After much thought, you can’t pass the parameters like this. You need to use the $params array.