1
gooloomoo
How to Validate if the profile search fields are empty?!
  • 2011/2/1 19:42

  • gooloomoo

  • Not too shy to talk

  • Posts: 110

  • Since: 2006/6/27


Hello

Is there any way to add a check to the profile search fields, and not allow a empty search.

Currently, if we leave the search fields as blank, the search result will show all of the users.

Thanks.

2
ghia
Re: Minimum keyword length for profile search fields ?!
  • 2011/2/2 11:51

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


No, because then you should have to fill in all fields something, which is not desiireable.

3
gooloomoo
Re: Minimum keyword length for profile search fields ?!
  • 2011/2/2 18:39

  • gooloomoo

  • Not too shy to talk

  • Posts: 110

  • Since: 2006/6/27


Actually, I mean users should at least enter one keyword in any one of those search fields, otherwise, it will popup a msg"Please enter keywords"( just like the default content search).

4
gooloomoo
Re: Minimum keyword length for profile search fields ?!
  • 2011/2/2 21:34

  • gooloomoo

  • Not too shy to talk

  • Posts: 110

  • Since: 2006/6/27


In the defualt seach.php line76, it checks if the query is empty.

if ($query == "") {
redirect_header("search.php", 1, _SR_PLZENTER);
exit();
}


But there is no check in modules\profile\seach.php, I just don't know which function can do this work.

Any hint will be great.

Thanks.

Login

Who's Online

310 user(s) are online (232 user(s) are browsing Support Forums)


Members: 0


Guests: 310


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits