Search form - search multiple fields for keywords

5 posts by 3 authors in: Forums > CMS Builder
Last Post: October 7, 2008   (RSS)

Re: [rjbathgate] Search form - search multiple fields for keywords

By Donna - October 6, 2008

Hi Rob,

At the moment, "OR" searches are not possible in CMS Builder without some custom programming. If you'd like to get a quote on that, drop us an email and we can discuss it further. :)
Donna

--
support@interactivetools.com

Re: [Donna] Search form - search multiple fields for keywords

Hi Donna,

Cheers for the reply.

I might be able to work around the AND problem - but how do I have the <input> search both fields for the keyword?

The two <input> lines written above don't seem to work in creating the end result of looking in both fields, as the below url would:

page.php?field1_keyword,fieldb_keyword=test

Thanks again
Rob

Re: [rjbathgate] Search form - search multiple fields for keywords

By Dave - October 7, 2008

Hi Rob,

Try this: page.php?field1,fieldb_keyword=test

And see the docs here for more info on different search query formats:
http://www.interactivetools.com/docs/cmsbuilder/viewer_search.html

And as for "OR" and advanced searching - it get's pretty complicated pretty quick and we end up re-creating SQL. The simplest way to do it is to give your field a custom name, manually generate the WHERE and pass that as an option to getRecords().

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Search form - search multiple fields for keywords

Cheers guys :)

I might do some changes to search engine and just split the fields.... sounds like it might be easier!

Cheers again
Rob