Gossamer Forum
Home : Products : DBMan : Customization :

Fixed 'sort by' field

Quote Reply
Fixed 'sort by' field
Is it possible to have the 'sort by' field fixed in the search table??

i.e. not a drop-down list, but a fixed data column value such as 'Price'. The ascending/descending drop-down would still apply.

Best regards, Brian

Quote Reply
Re: Fixed 'sort by' field In reply to
Sure.

In sub html_search_options, delete:

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>
and insert

Code:

<input type="hidden" name="sb" value="the number of the field you want to sort by">
JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Fixed 'sort by' field In reply to
Thanks JPD

What a great program ;-)

Best regards, Brian