Gossamer Forum
Home : Products : DBMan : Installation :

Hidden fields show up on Search page

Quote Reply
Hidden fields show up on Search page
I've just about got everything the way I want it now (thanks for all the help and the fantastic mods), but one problem left - on the "Search the Database" page, at the bottom where there's a dropdown list to "Sort By" it includes two fields that are hidden (except admin can view). These are userid and date added fields, and I would prefer those not be listed. I've logged in as a default user (view only permissions) and a user name (view/add/modify) and it shows up under everyone.

How do I get rid of those fields?

Thanks!

jal2

Quote Reply
Re: Hidden fields show up on Search page In reply to
p.s. I'm using a combo of the user friendly mod along with the short/long display mod, and some other extra code I found here and over at the "unofficial faq" site. I'm going to add some more mods, but wanted to get it all running smoothly before doing any more messing around.

Quote Reply
Re: Hidden fields show up on Search page In reply to
You would make changes within sub html_search_options
to display the actual field choices.

This may be different than the default settings but this is an example of displaying only the fields you choose. Notice you would just change the field names to match your database.


sub html_search_options {
# --------------------------------------------------------
# Search options to be displayed at the bottom of search forms.
print qq~
<P><CENTER> <$font><STRONG>Search Options:</STRONG>
<BR>
<INPUT TYPE=HIDDEN NAME="Validated" VALUE="Yes">
<INPUT TYPE="CHECKBOX" NAME="ma"> Match Any
<INPUT TYPE="CHECKBOX" NAME="cs"> Match Case
<INPUT TYPE="CHECKBOX" NAME="ww"> Whole Words
<INPUT TYPE="CHECKBOX" NAME="re"> Reg. Expression<BR><BR>
Keyword Search</font> <FONT SIZE=-1> (will match against all fields)</FONT><BR>
<INPUT TYPE="TEXT" NAME="keyword" SIZE=30 MAXLENGTH=255><BR><BR>
<$font> Return records <INPUT TYPE="radio" NAME="mh" VALUE="$db_max_hits" CHECKED><B>in a list</B> or <INPUT TYPE="radio" NAME="mh" VALUE="1"><B>one record at a time</B>. </font>
<P>
<table border=0 width=470>
<TR><TD><$font>Sort By:</font></TD><TD><$font>Sort Order:</font></TD><TD><$font>Max. Returned Hits</font></TD></TR>
<tr valign=top><TD><select name="sb" size="1">
<option>Select from list
<option value="Business_Name">Business Name
<option value="City">City
<option value="Zip">Zip
<option value="State">State
<option value="County">County
</select></TD><TD><SELECT NAME="so">
<OPTION VALUE="ascend">Ascending<OPTION VALUE="descend">Descending</SELECT></TD>
<TD><INPUT TYPE="TEXT" NAME="mh" VALUE="$db_max_hits" SIZE=3 MAXLENGTH=3></TD></tr></table></CENTER>


<$font><strong>Search Tips:</strong>
- use '*' to match everything in a field)<BR>
- put a '>' or '<' at the beginning to to do range searches.<BR></font>
~;
}

Hope this helps.

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: Hidden fields show up on Search page In reply to
Ahh, that worked just perfectly! I subtituted that for the original subroutine after choosing what to list, and it's running smoothly.

Thank you so much!!!

jal2