1. seiyass
  2. General
  3. Monday, June 08 2015, 12:47 AM
Hi. I have two questions

1) Can I make a customfield that is "select-type" and "multiple options" in profile, to only have "one-single-selection" on search modules?

2) On search-module, options inside multiple-select-type-fields act as "Option1 AND Option2" when searching. Can I make it act as "Option1 OR Option2"
For example if someone searchs for "Movies, Sports" inside "Interest-fields", I want the search-results to display users with either "movies" or either "sports" instead of both

Thanks :)
admin Accepted Answer
Admin
Hi,
yes but this is not simple, custom fields are composed from these files:
- administrator/com_jsn/helpers/fieldtype.php (here you can set Joomla XML to load field, output of search form, and search query)
- administrator/com_jsn/helpers/fieldtype.xml (here you can set parameters of field, this use Joomla XML sintax)
- administrator/com_jsn/models/fieldtype.php (optionally, if type not is Joomla native format you need to specify here, this file contain model of field inherit from JFormField Joomla class)

This is complex so I suggest you to simply modify the current select field type (administrator/com_jsn/helpers/selectlist.php)
  1. more than a month ago
  2. General
  3. # 1
seiyass Accepted Answer
Pro
Hi again.
I donĀ“t know how to edit/set up xml or php.
Could you please help me make the select-fields (which are set to multiple options in profile) to be single (not multiple) in search-module?
  1. more than a month ago
  2. General
  3. # 2
admin Accepted Answer
Admin
Could you please help me make the select-fields (which are set to multiple options in profile) to be single (not multiple) in search-module?
Try to edit file /administrator/com_jsn/models/selectlist.php, at lines 142, 186 replace this:
$field->params->get('select_multiple',0)

with this
false
  1. more than a month ago
  2. General
  3. # 3
seiyass Accepted Answer
Pro
It is working perfectly!!! Thanks a lot
  1. more than a month ago
  2. General
  3. # 4
seiyass Accepted Answer
Pro
Content Protected
  1. more than a month ago
  2. General
  3. # 5
admin Accepted Answer
Admin
before line 215 add this code:
$option=array($option);
  1. more than a month ago
  2. General
  3. # 6
seiyass Accepted Answer
Pro
Excellent,
Thank you very much. Easyprofile is a great extension, and your support is the best
  1. more than a month ago
  2. General
  3. # 7
  • 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.