A common scenario in Web site search is to have a simplified toolbar or compact search on the home page or in the Website template.  This allows the search to remain as an easily accessible feature or as a bold call to action on the home page.

MetaLocator allows this type of behavior using two different methods.  The first allows you to build a simple HTML form, which redirects to the page on which your interface is deployed.  The second uses a compact MetaLocator interface which is configured to redirect to another page when searched.

We recommend the first option whenever possible, because it doesn't require your Website to load an interface just to present a search form.  However, if your search form includes custom or data-driven fields (like a state or city drop-down list), using the second method is the best route.

HTML Form Method

You can also use this method to create your own search form.  This is the best method for inserting a quick "Nearest Store" search box in your Website header, for example.

A simple HTML example follows, where locator.html is the page on which your MetaLocator interface is deployed.

<input id="postal_code" type="text" />
 <input type="button" id="btn_submit" onclick="window.location.href='locator.html?ml___task=search_zip&ml___radius=200&ml___postal_code=' + document.getElementById('postal_code').value;" value="Submit" />

Interface  Method

You can also configure your interface to display the user's search results to a different page of your Website.  In this scenario, you install your interface on both the page on which you want to display and form, and the results page.  We'll call those Page A and B, respectively.

First, install your interface on Page A.  To ensure that only the form is displayed, under Data Settings, set "Show All Records by Default?" to "No".

Then set the full address of Page B in Advanced Settings "URL to Redirect Search"

Then install your Interface on Page B.

This should allow the Interface to be displayed on both pages with a search form on both pages, and a compact form on Page A.

In the example above, we install the same Interface on both pages.  This method can also work with two different Interfaces.  For example, if there are features or options you want displayed on Page B that conflict with your needs on Page A, you can create a second interface for use on Page B.




Did this answer your question?