1. rayjbarrett
  2. General
  3. Tuesday, January 21 2020, 04:34 PM
I have a field type select where the visitor will select a State/Region and it allows for multiple selections. However, when a visitor selects more than one State/Region it expands the criteria to all profiles which have either State/Region. I want it to restrict the results to the profiles which have BOTH/ALL the States/Regions selected. How can I do this?
References
  1. https://telementalhealthtraining.com/find-a-provider
admin Accepted Answer
Admin
Hi,
unfortunately this is not possible without a hard code change.

In file at /administrator/components/com_jsn/helpers/fields/selectlist.php at line 254 replace this code:
$where.='b.'.$db->quoteName($field->alias).' LIKE '.$db->quote('%"'.$opt.'"%').' OR '.'b.'.$db->quoteName($field->alias).' = '.$db->quote($opt).' OR ';
with this
$where.='(b.'.$db->quoteName($field->alias).' LIKE '.$db->quote('%"'.$opt.'"%').' OR '.'b.'.$db->quoteName($field->alias).' = '.$db->quote($opt).') AND ';
  1. more than a month ago
  2. General
  3. # 1
rayjbarrett Accepted Answer
Worked. Thank you.
  1. more than a month ago
  2. General
  3. # 2
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.