Hello! profile_checkboxes is a great module but I've hit a snag.
I'm trying to use profile_checkboxes with the profile ability to browse field by value and it isn't working as expected.
Lets say I have a profile field called 'Subjects I like'. I use profile_checkboxes to allow people to pick any or all of:
- math
- english
- programming
- art
If a user picks 'math', 'english', and 'art', then on their profile page it'll say:
Subjects I like: math, english, art
Now I'd expect the user to be able to click one of these (say, math), and it'll take them to a page showing all users who like math.
Unfortunately, the actual behavior is that it takes them to a page showing them all users who like the exact combination of math, english and art. Specifically, it takes them to: http://example.com/profile/profile_subject/math, english, art
I assume the reason is that profile_checkboxes uses the 'list selection' profile field type instead of the 'freeform list' type?
Help!
Please let me know if I can provide further info.
Comments
Comment #1
johnhanley commentedYeah, this behavior is expected as the string "math, english, art" is stored as a literal string delimited by ", " ([comma space]) in the default "value" profile_values database table column.
One possible workaround is to use Views and create a "contains" filter and pass the desired value as an argument.
Outside of that you have identified a limitation of the module.
Comment #2
drumnjo commentedi ran into the same issue. can you please provide a little more detail about the filter and argument setup? i'm not that experienced with those. i would basically not want the user list in the beginning to be affected by the filter/argument but need the resulting list from the multiple selection to be separated.
thanks
joe
Comment #3
johnhanley commentedI'm not sure what you're asking.
The Profile Checkboxes module stores the user's selections as a comma delimited string in the same database table column used to store single string values. I realize this makes it difficult for the user list functionality to work correctly because ordinarily each selection would only contain a single string value.
The multiple choice data for use with User Lists is limited to comparing users with identical interests (AND, not OR).
If anyone has any suggestions on how to make this more flexible and robust fire away.
Comment #4
drumnjo commentedthanks for the reply.
i actually had to opt not using the module for now because in 'views' 'user' list, the individual selections from the multiple checkboxes didn't translate into separate links. i understand that you understand this limitation....if ever resolved i would like to use the module as it would still make for a streamlined registration screen!
thanks
joe
Comment #5
johnhanley commentedI've been giving this matter some thought and believe the best way is to use single checkboxes together grouped by a category. This is default profile module behavior so there's no additional custom module required.