1. k2bmedia
  2. General
  3. Friday, September 29 2017, 12:27 PM
Hi,

we want to combine multiple profile fields into one search field.

Is is possible to do this?
admin Accepted Answer
Admin
Sorry, but Easy Profile does not have this feature.
  1. more than a month ago
  2. General
  3. # 1
k2bmedia Accepted Answer
Is it otherwise possible to search a hidden field?
  1. more than a month ago
  2. General
  3. # 2
admin Accepted Answer
Admin
Hi,
Easy Profile Search module allow you to search by a Hidden custom field type
  1. more than a month ago
  2. General
  3. # 3
k2bmedia Accepted Answer
Is it possible to fill in a hidden custom field bij several other custom fields.

I want to add a hidden field with name 'search'

than fill this field with 'Field a' + 'Field b' + 'Field c', so with this workaround I can do a search on all te data.
  1. more than a month ago
  2. General
  3. # 4
admin Accepted Answer
Admin
Yes, but it is not so simple.

You can fill hidden field by creating a simple plugin:
- Download, Install and Enable Skeleton Plugin (you will find it at http://docs.easy-profile.com/index.php/article/triggers)
- Open file /plugins/jsn/skeleton/skeleton.php
- Remove samples functions: triggerFieldAvatarUpdate, triggerProfileUpdate
- add function like this:
public function triggerProfileUpdate($user, &$data, $changed, $isNew)
{
$data[ 'search' ] = $data[ 'field1' ] . ' ' . $data[ 'field2' ] . ' ' . $data[ 'field3' ] ;
}


Something like this can work with Text, Textarea, Phone, Email....BUT....
problem 1
Fields like checkboxes, select and radio store value and not text in DB, so for example for a field like radio you have these options:
opt1|Art
opt2|Music
then $data[ 'radio_field' ] is equal to opt1 or opt2 and not equal to Art or Music
problem 2
Fields like checkboxes or select (with multiple value enabled) store values in JSON format, so you need to decode values in a first step
  1. more than a month ago
  2. General
  3. # 5
  • Page :
  • 1


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