All Collections
Troubleshooting and FAQ
Can I create a small search box on my site?
Can I create a small search box on my site?
Bryan Nye avatar
Written by Bryan Nye
Updated over a week ago

Yes. To create a simple, compact search form, you can create a simple HTML form that passes information to a MetaLocator Interface installed on our Web site.  This technique should be used when adding a location search to your website template for use on all (or many) pages.

This simple example shows a postal code entry box, with a button that redirects to "locator.html". This example assumes that you have installed your Metalocator Interface within the locator.html page on your Web site.  If you use this code directly, be sure to change 'locator.html' to the full path of the page on which you've pasted the MetaLocator Interface code.

 <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" />

More information about passing data to the MetaLocator Interface can be found here.

*** Note this technique doesn't work on the Wix sites due to constraints of the Wix platform.

Did this answer your question?