Skip Navigation
PrintPrint version

Basic Search Code Using the Collection (Site) Parameter

Basic "Search this Site" Code

To add a basic "search this site" form to your site, you need only add the following form code to your site with a few modifications.

  1. First, copy the following code and paste it into a blank HTML document.






  2. Next, make the following edit to this line of the code:

    1. <input type="hidden" name="site" value="your_collection"/>

      Replace "your_collection" with a collection that corresponds to your search domain(s).

      What is my collection?

      What if I can't find a collection which contains domain(s) that I wish to have searched?

    2. <input type="hidden" name="client" value="your_frontend"/>

      <input type="hidden" name="proxystylesheet" value="your_frontend"/>

      Replace "your_frontend" with a frontend that corresponds to your department or agency.

      What is my frontend?

  3. Additional (optional) edits you can and cannot make:

    1. You can change the size of the search input box (it defaults to "40.")

    2. You can add an image for the search button, but do not change the name="btnG" parameter.

    3. You can use a table to control the layout of the form, but do not break up the form into separate tables or the code will not work.

    4. You can use style sheets to control the layout of the form (recommended over using tables)

    5. See the instructions on customizing for more.

  4. Upload your form code and test it out. Search results should be within your site.