Searching Multiple fields

5 posts by 2 authors in: Forums > CMS Builder
Last Post: March 2, 2009   (RSS)

By zip222 - March 2, 2009

I have used CMSB for many projects but I haven't had the need to utilize the search capabilities until now. Adding a form that searches one field is really easy, but what I really want is for a single box to search across multiple fields.

Here is the code I am using:
<form method="POST" action="/news/index.php">
<input type="text" name="title_keyword" value="">
<input type="submit" name="submit" value="Search">
</form>


In addition to searching the "title" field, I also want the search to run through a few other fields. But I only want to use one <input> box. Is this possible?

-jason

Re: [jdancisin] Searching Multiple fields

By zip222 - March 2, 2009 - edited: March 2, 2009

Nevermind. Figured it out...

<form method="POST" action="/news/index.php">
<input type="text" name="title,content_keyword" value="">
<input type="submit" name="submit" value="Search">
</form>

Re: [jdancisin] Searching Multiple fields

By Dave - March 2, 2009

Glad you got it working! Let us know if you need anything else. :)
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Searching Multiple fields

By zip222 - March 2, 2009 - edited: March 2, 2009

Do you have any good suggestions for a site-wide search?

-jason