Author Topic: Display multi-select/checkbox field in views2  (Read 2378 times)

Offline mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Display multi-select/checkbox field in views2
« on: July 09, 2009, 06:39:31 pm »
Brief: multi-select/checkbox fields appear to display in views as a string, not as separate items.  Is there a way to fix this?

Details: I created a custom field 'academic interests', checkbox.  In views, I can call the field, but it displays like this: AgapeBioethicsBuddhist_Ethics.  What I want is this: "Agape, Bioethics, Buddhist Ethics".

Is this possible?  It appears that it is treating output as a string of text, not a list of items.
Thanks,
Maria

Update: on further investigation, this is a problem with other multiselect fields, such as "preferred_contact_method".  It just strings them all together, "123" rather than "1, 2, 3".
« Last Edit: July 09, 2009, 07:31:52 pm by mariagwyn »

Offline Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 14731
  • Karma: 440
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Display multi-select/checkbox field in views2
« Reply #1 on: July 09, 2009, 09:31:18 pm »

i suspect you will need to write (or fix) the handler for multi-selects in the code at: drupal/modules/views/civicrm/* to properly format the text there

we are not too familiar with the code base and cannot help u a lot there. if you do find the relevant file and fix, please do post an issue along with a patch

thanx

lobo
Found this reply helpful? Contribute NOW and help improve CiviCRM with the Make it Happen! initiative.

Offline junix123

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: Drupal 7
  • MySQL version: 5.1.63-cll
  • PHP version: 5.3.9
Re: Display multi-select/checkbox field in views2
« Reply #2 on: June 27, 2012, 06:26:56 pm »
Brief: multi-select/checkbox fields appear to display in views as a string, not as separate items.  Is there a way to fix this?

Details: I created a custom field 'academic interests', checkbox.  In views, I can call the field, but it displays like this: AgapeBioethicsBuddhist_Ethics.  What I want is this: "Agape, Bioethics, Buddhist Ethics".

Is this possible?  It appears that it is treating output as a string of text, not a list of items.
Thanks,
Maria

Update: on further investigation, this is a problem with other multiselect fields, such as "preferred_contact_method".  It just strings them all together, "123" rather than "1, 2, 3".

Hi, I have the same problem in Drupal 7 and Views 3, have solve this one?
I hope you can share if it happened you solve this one.

thanks