Simple search reset
3 posts by 2 authors in: Forums > CMS Builder
Last Post: September 22, 2009 (RSS)
After ages trying to avoid the single-table search function in CMSB because I just thought I didn't understand how it worked, I was forced to dive in today. I can't say I really understand how keywords are passed around the site, but I'll admit that I'm now an Official Search Convert!
It works like a charm and is fast too! If I had understood this better going into the current project I could have saved myself many hours.
Anyway, one question and one comment:
Q - Once you've done a bunch of searches and you're left with few or zero results, is there a proscribed way to reset the search parameters? FYI, my search form is on the same page as the results. Right now I've just added a text link below the form which reloads the whole page. Is there a better way?
Comment - Part of my issue with avoiding the single-table search was that mysterious checkbox in the Code Generator.
I was incorrectly interpreting this to mean that if I had more than one viewer on a page then search filtering wasn't possible... making this feature less that appealing. Am I right in understanding this as "There Can Be Only One... viewer which receives search inputs on a given page."? So multiple viewers are fine so long as only one has this feature active?
J.
It works like a charm and is fast too! If I had understood this better going into the current project I could have saved myself many hours.
Anyway, one question and one comment:
Q - Once you've done a bunch of searches and you're left with few or zero results, is there a proscribed way to reset the search parameters? FYI, my search form is on the same page as the results. Right now I've just added a text link below the form which reloads the whole page. Is there a better way?
Comment - Part of my issue with avoiding the single-table search was that mysterious checkbox in the Code Generator.
Filter results based on search form input (disable for multiple viewers on one page)
I was incorrectly interpreting this to mean that if I had more than one viewer on a page then search filtering wasn't possible... making this feature less that appealing. Am I right in understanding this as "There Can Be Only One... viewer which receives search inputs on a given page."? So multiple viewers are fine so long as only one has this feature active?
J.
Re: [InHouse] Simple search reset
By Chris - September 22, 2009
There can be many, but you probably only want one most of the time. There's nothing stopping you from enabling search on multiple viewers on the same page, but there are many cases where it wouldn't make sense.
Consider a page that displays a site-wide navigation menu (from a viewer) and a list of products (also from a viewer). If the visitor is searching for products, you wouldn't want the user's search criteria to filter the navigation menu! That's what the "Filter results based on search form input" option is for.
I hope this clears things up. I'll try to think of some better wording for that option.
While there's nothing wrong with a link, aesthetically you may want to use a button instead. Often that's as simple as creating a second <form>:
Hope this helps! Please let us know if you have any more questions. :)
Consider a page that displays a site-wide navigation menu (from a viewer) and a list of products (also from a viewer). If the visitor is searching for products, you wouldn't want the user's search criteria to filter the navigation menu! That's what the "Filter results based on search form input" option is for.
I hope this clears things up. I'll try to think of some better wording for that option.
Once you've done a bunch of searches and you're left with few or zero results, is there a proscribed way to reset the search parameters? FYI, my search form is on the same page as the results. Right now I've just added a text link below the form which reloads the whole page. Is there a better way?
While there's nothing wrong with a link, aesthetically you may want to use a button instead. Often that's as simple as creating a second <form>:
...
<input type="submit" value="Search" />
</form>
<form action="?">
<input type="submit" value="Reset" />
</form>
Hope this helps! Please let us know if you have any more questions. :)
All the best,
Chris
Chris
Re: [chris] Simple search reset
Perfect. I tried the reset option but not as as discrete form. Works like a charm!
Thank you once again.
J.
Thank you once again.
J.