Multiple Search
8 posts by 3 authors in: Forums > CMS Builder
Last Post: December 13, 2010 (RSS)
By design9 - December 10, 2010
I am looking to set up a search that can search multiple fields at once with only one search button. I saw the multisearch.php that Dave posted but I am not sure if that is what I need to use because the fields are all in the same table.
I have a distribution table and the following fields:
name,address,city,state, zip and a category menu of publications available at a location. This is what I am trying to do:
I would like to have a keyword search that will look in all fields, a search for only city, search for only zip and a search that searches the publications (note this is a category menu and I pulled that into distribution table as a list field...advanced option). I want to give the user all these options and one search button. This way they can select just one option or multiple options at the same time to narrow their search. Can you help me figure out the best way to achieve this?
Thanks!
April
Re: [apdance9] Multiple Search
By Jason - December 10, 2010
What you need to do is have a single form with all your fields in it. To use CMS Builder's automatic searching functions you need to make the names of your form elements the same as the names of the fields in your section.
You can search against multiple fields at a time like this:
<input type="text" name="name,address,city,state,zip_keywords" />
You can make multiple inputs, each with the name of just one of the fields. Also, leave off "_keywords" from the end.
If you can give more more details of how your menu list field and can give you a better example of how to set that one up.
Hope this helps.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] Multiple Search
By design9 - December 10, 2010
I did figure out the multi-search but I am still having a little trouble with my category search. Here is the page that I am using to test the searches:
http://www.piedmontparent.com/publications/findmagazine/search.php
Also, I have included my code below as an attachment, Can you look at my category code and see what I am doing wrong? Right now, the category search pulls all listings and is not filtering them by the category that I choose to search by.
Thank you for your help.
April
Re: [apdance9] Multiple Search
By Jason - December 10, 2010
What are the details of your category list field in your section?
Is it a single, or multi-value drop down?
What is the value field?
Let me know and I can help you sort out your code.
Thanks
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] Multiple Search
By design9 - December 10, 2010
The field for the actual list I created in mag locater viewer list is "publications". The field name in the category viewer where I first input the categories (publications) is "name".
Hope that helps.
Thanks!
April
Re: [apdance9] Multiple Search
By Chris - December 11, 2010
I think all you'll need to do is change this line:
<select name="category">
...to this:
<select name="publications">
Please let me know if this fixes things! :)
Chris
Re: [chris] Multiple Search
By design9 - December 13, 2010
Have one other question. I saw that you all now offered the geolocater plugin. That is exactly what I need. I am building a magazine locater (links above) so it can include a google map of location. It would also be nice to have the distance search and the ability to put multiple points on a map if we wanted instead of just the single pointer. Do you all have any websites or live examples that are using this plugin so I can show my company an example to help talk them into buying this? It would be helpful to show the staff an example first.
Thank you,
April
Re: [apdance9] Multiple Search
By Jason - December 13, 2010
This plugin is quite new, so we don't currently have any showcased sites that use it. To get an idea of what it will look like you can reference the add on page and take a look at the screen shots:
http://www.interactivetools.com/add-ons/detail.php?Geocoder-1034
The code the plugin provides is for google maps, so the result will look like a standard google map. If you have any further questions or concerns, please send an email to support@interactivetools.com
Hope this helps
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/