Support

  1. devdan
  2. Support
  3. Sunday, July 20 2014, 03:12 AM
Hello,

Searching for multiple checkbox in userlist it doesn't display what i'm trying to achieve.

eg

If I have lets say
check1 check2 check3 check4

and select multiple of check1 and check4
It only shows users that have both of those checked on profile

I want be able to display user that have either one of the checks selected to be shown, so if user has check1 but not check4 it should still display in results...

Hope this makes sense.. Its most likely something really simple but cant seem to figure it out...
Thanks
Accepted Answer
admin Accepted Answer
Admin
Hi Dan,
the results must respect all conditions.

If you want to do this you can replace the function "getSearchQuery" at file /administrator/components/com_jsn/helpers/fields/checkboxlist.php with this:
public static function getSearchQuery($field, &$query)
{
$options=JRequest::getVar($field->alias,null);
$db=JFactory::getDbo();
$querystring=array();
foreach($options as $option)
{
$querystring[]='b.'.$db->quoteName($field->alias).' LIKE '.$db->quote('%"'.$option.'"%');

}
$query->where(implode(' OR ',$querystring));
}


NOTE: we have not tested this code
NOTE 2: when you update Easy Profile you must replace this function because the file will be overwrite.
  1. more than a month ago
  2. Support
  3. # Permalink
devdan Accepted Answer
Thanks Heaps!!!!!

You know what your amazing!!! Super quick response.... Hey it might be a hack (used to it, just need to take note during updates.) but it seems to be working from what i quickly tested..

Hopefully one day u make it an option in backend...

Thanks
  1. more than a month ago
  2. Support
  3. # 1
devdan Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 2
admin Accepted Answer
Admin
Sorry, but is not possible because you must edit 20/30 files to do this.
  1. more than a month ago
  2. Support
  3. # 3
devdan Accepted Answer
Nah thats ok I can imagine it's not a simple fix. But thanks for the other code I can still work around this using menu items. Something to think about in future developments maybe?
  1. more than a month ago
  2. Support
  3. # 4
jiggyj2z Accepted Answer
I'd like to suggest you include this in future versions also. It makes searching so much more flexible including OR conditions as well as AND.
  1. more than a month ago
  2. Support
  3. # 5
admin Accepted Answer
Admin
Thanks for your suggestion, it will consider! ;)
  1. more than a month ago
  2. Support
  3. # 6
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.
Sorry, the discussion is currently locked. You will not be able to post a reply at the moment.

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.