Gossamer Forum
Home : Products : Links 2.0 : Customization :

Searching with checkboxes

Quote Reply
Searching with checkboxes
On my site I have links fill in a list of their activities (up to 11). I want users to be able to search through the links by these activites too. The problem I've run into is that when a user checks 1 activity it won't show a listing. I tested around, and found that even if I check the same exact boxes it doesn't show the listing. Does anyone have experience with this? Anybody have any suggestions?

Quote Reply
Re: Searching with checkboxes In reply to
anybody know? for some reason the program has a problem with multiple checkboxes, its ok for one checkbox though, suggestions?

Quote Reply
Re: Searching with checkboxes In reply to
oh well

Quote Reply
Re: Searching with checkboxes In reply to
Hi,

if you're using checkboxes with the same name the values will be added by ~~ - which isn't very usefull for the links scripts. So you got to filter them out, something like

# Search for certain languages only. Mod by DC
if ($in{'lang'}) {
# Zunächst müssen die Delimeter in $in{'lang'} müssen herausgefilter werden... MOD by DC.
$in{'lang'} =~ s/\~/|/g;
($values[$db_Sprache] =~ m/[$in{'lang'}]/ig) or next LINE;
}

I use it to filter the search results for certain languages. Further info here:
http://www.gossamer-threads.com/...t=25&Old=6months
or here
http://www.gossamer-threads.com/...t=25&Old=6months

Denis