Gossamer Forum
Home : Products : DBMan : Customization :

Re: Filter search results

Quote Reply
Re: Filter search results In reply to
In Reply To:
The reason why I set it up since I wanna let users to have a better idea of what the date format is.
Oh. I see. Well, it makes a little more sense now. Smile

In Reply To:
"so" field???
Actually, I mistyped. It should be the "sb" field. That stands for "sort by."

In the html.pl file, sub html_search_options, there is the following code:

Code:

Sort By:
<SELECT NAME="sb">
<OPTION>---
~; for (my $i =0; $i <= $#db_cols; $i++) { print qq~<OPTION VALUE="$i">$db_cols[$i]</OPTION>\n~ if ($db_form_len{$db_cols[$i]} >= 0); } print qq~
</SELECT>
This allows users to sort by any field they want to select from a drop-down select field. If you would rather have all results sorted by a specific field every time anyone does a search, replace the code above with

<input type="hidden" name="sb" value="the number of the field you want to sort by">

In Reply To:
<<Delete the code in red that's below:>>
But do I have to add/change anything else in order to make use of it?
Nope. This will allow users to sort by either whole dates or partial dates. However, if they search for a whole date and they have the format wrong, they will not get any search results.

JPD
http://www.jpdeni.com/dbman/
Subject Author Views Date
Thread Filter search results faithlezz 3238 Jun 25, 2000, 7:41 AM
Thread Re: Filter search results
Stealth 3116 Jun 25, 2000, 10:57 AM
Thread Re: Filter search results
aladdin88 3098 Jun 26, 2000, 10:31 PM
Thread Re: Filter search results
Stealth 3104 Jun 26, 2000, 10:39 PM
Thread Re: Filter search results
aladdin88 3111 Jun 27, 2000, 12:24 AM
Thread Re: Filter search results
JPDeni 3109 Jun 27, 2000, 12:42 AM
Thread Re: Filter search results
aladdin88 3117 Jun 27, 2000, 10:22 PM
Thread Re: Filter search results
JPDeni 3068 Jun 28, 2000, 12:07 AM
Thread Re: Filter search results
aladdin88 3063 Jun 28, 2000, 8:33 PM
Thread Re: Filter search results
JPDeni 3067 Jun 28, 2000, 11:57 PM
Thread Re: Filter search results
aladdin88 3043 Jun 29, 2000, 8:40 PM
Post Re: Filter search results
JPDeni 3035 Jun 30, 2000, 1:38 AM