Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Help with search for website

 

 


_kate_
User

Mar 23, 2009, 12:36 AM

Post #1 of 2 (842 views)
Shortcut
Help with search for website Can't Post

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?
Attachments: search.jpg (22.1 KB)


Dave
Staff / Moderator


Mar 23, 2009, 12:01 PM

Post #2 of 2 (829 views)
Shortcut
Re: [_kate_] Help with search for website [In reply to] Can't Post

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!

Dave Edis - Senior Developer
interactivetools.com