Help with search for website
2 posts by 2 authors in: Forums > CMS Builder
Last Post: March 23, 2009 (RSS)
By _kate_ - March 23, 2009
Hi,
I'm doing a search for a real estate website that I eventually want to function as per the attached image.
I'm new to this so taking one field at a time :) Starting on only the rentals search for now.
So far I have this (just the suburb field) >>
<form method="POST" action="/rentals.php">
<input type="text" name="suburb" value="">
<input type="submit" name="submit" value="Search">
</form>
I am going to cut it back so that it only searches for Suburb now (not postcode and property ID as well). It works fine for one suburb, but if you try and put in multiple suburbs separated by a comma it does not work. What do I need to change to get this to work?
I'm doing a search for a real estate website that I eventually want to function as per the attached image.
I'm new to this so taking one field at a time :) Starting on only the rentals search for now.
So far I have this (just the suburb field) >>
<form method="POST" action="/rentals.php">
<input type="text" name="suburb" value="">
<input type="submit" name="submit" value="Search">
</form>
I am going to cut it back so that it only searches for Suburb now (not postcode and property ID as well). It works fine for one suburb, but if you try and put in multiple suburbs separated by a comma it does not work. What do I need to change to get this to work?
Re: [_kate_] Help with search for website
By Dave - March 23, 2009
Hi Kate,
The automatic search features are loosely modeled after how Google works, since it's the most common search engine that users would be familiar with. So adding additional terms further reduces the amount of results returned. Each result must contain each term. So if you search for multiple suburbs names that the field must contain all the names.
The type of search you're describing sounds like an "OR" search where you get a result if either one keyword _or_ another keyword match. You can do that, but you need to hardcode it and write some php.
The simplest is just to have a keyword search field that search for keywords across multiple fields, like this:
<input type="text" name="suburb,description_keyword" value="">
See the search docs page for more details:
http://www.interactivetools.com/docs/cmsbuilder/viewer_search.html
Hope that helps!
The automatic search features are loosely modeled after how Google works, since it's the most common search engine that users would be familiar with. So adding additional terms further reduces the amount of results returned. Each result must contain each term. So if you search for multiple suburbs names that the field must contain all the names.
The type of search you're describing sounds like an "OR" search where you get a result if either one keyword _or_ another keyword match. You can do that, but you need to hardcode it and write some php.
The simplest is just to have a keyword search field that search for keywords across multiple fields, like this:
<input type="text" name="suburb,description_keyword" value="">
See the search docs page for more details:
http://www.interactivetools.com/docs/cmsbuilder/viewer_search.html
Hope that helps!
Dave Edis - Senior Developer
interactivetools.com
interactivetools.com