Multi Field Search

5 posts by 4 authors in: Forums > CMS Builder
Last Post: November 5, 2013   (RSS)

By theclicklab - November 3, 2013

Is there a simple way to search multiple fields at once? Here is an example search form:

<form id="search" name="search" method="get" action="/search.php">
<input name="title_keyword" type="text"  />
<input type="submit" name="submit" value="Submit">
</form>

So for name, could we list multiple fields like this?

name="title_keyword,content_keyword,etc..."

Thanks

By ht1080z - November 4, 2013

Hi clicklab,

you can find information about the multisearch here:

http://www.interactivetools.com/forum/forum-posts.php?postNum=2213941#post2213941

I hope this will help,
Karls

By zip222 - November 5, 2013

Multisearch is likely overkill for your needs...

You just need to modify the form code you have slightly...

<form id="search" name="search" method="get" action="/search.php">
<input name="title,other,and_another,content_keyword" type="text"  />
<input type="submit" name="submit" value="Submit">
</form>

you can include as many fields as you want, and just you need to add "_keyword" to the final field in the list.

Special fields like dates and drop downs lists won't necessarily be searched the way you might expect.

By ross - November 5, 2013

Hi theclicklab

I think zip222 has you on the right track. I think starting with modifying keyword field on your form and that should get things going. If it doesn't give you the desired results, we can take it to the next step from there.

Let us know how you make out :).

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/