We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25737
    • 62 Posts
    Hey guys. I would like to have a basic search form that displays the results on a new page. I also want to use my modified form, not the standard template one.

    Here is the code for my form:

    <form action="index.php?id=2" method="post">
                                    <span class="sbox_l"></span>
    				<span class="sbox"><input type="search" id="srch_fld" placeholder="Search..." autosave="applestyle_srch" results="5" onkeyup="applesearch.onChange('srch_fld','srch_clear')" /></span>
    				<span class="sbox_r" id="srch_clear"></span>
    </form>
    


    Here is the code on my search results page:
    [!AjaxSearch? &ajaxSearch=`0` &AS_landing=`2`!]


    Do I have to change anything in the snippet itself? Do I have to modify the look of the form in the template file or can I just assign the correct form action to my already existing form?

    Thanks!!
      Faithfully using MODx since 2007!
      • 5811
      • 1,717 Posts
      First download the version 1.8.
      I would like to have a basic search form that displays the results on a new page.
      With 1.8 for that use &AS_landing parameter. See the "landing" test on the demo site.
      I also want to use my modified form, not the standard template one.
      Simply adapt the templates:

      ==== Extended place holder templating and template parameters

      To use un anoter template, define the template name and location with
      @FILE:assets/snippets/ajaxSearch180/templates/folderName/templateName.tpl.htm
      or create a chunck parameter by copy/paste and change of an existing template.

      &tplLayout : chunk to style the ajaxSearch input form and layout
      Global ajaxSearch layout (input form, intro message, results)
      by default : /templates/layout.tpl.html

      Non ajax mode & more results page :

      &tplResults : chunk to style the output results outer
      Results outer layout (number of results, list of results, paging)
      by default : /templates/results.tpl.html

      &tplResult : chunk to style each output result
      Result template (title link, description, extract, breadcrumbs link)
      by default : /templates/result.tpl.html

      &tplPaging : chunk to style the paging links
      Paging link template (pages, current page)
      by default : /templates/paging.tpl.html

      Ajax mode :

      &tplAjaxResults : chunk to style the ajax output results outer
      Results outer layout (number of results, list of results, more results link)
      by default : /templates/ajaxResults.tpl.html

      &tplAjaxResult : chunk to style each ajax output result
      Result template (title link, description, extract, breadcrumbs link)
      by default : /templates/ajaxResult.tpl.html

      For more information read the ajaxSearch_version_180.txt. Wiki documentation coming soon.