CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • CiviCRM + Drupal Views: Filter options... dropdown, autofill?
Pages: [1]

Author Topic: CiviCRM + Drupal Views: Filter options... dropdown, autofill?  (Read 924 times)

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
CiviCRM + Drupal Views: Filter options... dropdown, autofill?
June 13, 2014, 06:02:06 pm
Hello all,

I generally get awesome results building Drupal Views with CiviCRM data however sometimes I find the filter options to be lacking. For instance, I have a "CiviCRM Contacts" view that provides me with a display of a members roster and another of the organizations that the members belong to. It works perfectly however, I though I would add a CiviCRM Address: City/Region field so that people could find an organization based on their location. Unfortunately all I can do out of the box is put in a text field.

I've hacked together a dropdown with a DB query and a little custom code but I'd much rather use a proper filter like a dropdown (select) or an autofill text field. Are there any modules or extensions that will provide extended filters in views?

Thanks,
Andrew 
My CiviCRM Extension Workshop: https://github.com/awasson

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: CiviCRM + Drupal Views: Filter options... dropdown, autofill?
June 15, 2014, 02:44:53 pm
I don't think so, so would be awesome if you could apply your apparent talents to extending the civicrm-views integration work
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Re: CiviCRM + Drupal Views: Filter options... dropdown, autofill?
June 15, 2014, 02:52:55 pm
Alright... I'm on it. My "ad hoc" coded solution actually works quite well so I'll see if I can wrap it up into a module so that views knows it's there. I'll post back once I get something one can just plug in that works.   
My CiviCRM Extension Workshop: https://github.com/awasson

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: CiviCRM + Drupal Views: Filter options... dropdown, autofill?
June 15, 2014, 05:48:18 pm
great - andrew i have asked chris to pop in here in case he can help provider any pointers since he has contributed a fair bit to the Views work in the past
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Re: CiviCRM + Drupal Views: Filter options... dropdown, autofill?
June 15, 2014, 06:46:10 pm
Fantastic! Thanks Pete.
My CiviCRM Extension Workshop: https://github.com/awasson

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: CiviCRM + Drupal Views: Filter options... dropdown, autofill?
June 15, 2014, 07:13:19 pm
@awasson - I'd say let's make this a patch to CiviCRM, rather than splitting it out into a module. Would you like to upload your current work to https://github.com/awasson so we can work from there on getting it into core?
@xurizaemon ● www.fuzion.co.nz

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Re: CiviCRM + Drupal Views: Filter options... dropdown, autofill?
June 15, 2014, 11:08:23 pm
Absolutely!

I'll dig into civicrm/drupal/modules/views/civicrm and see if I can add a filter handler for city. I think that's probably the best way to do this. If not, let me know.

Andrew
My CiviCRM Extension Workshop: https://github.com/awasson

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: CiviCRM + Drupal Views: Filter options... dropdown, autofill?
July 02, 2014, 05:39:01 am
Sounds good! Shout out if you need any pointers. Usually in IRC.
@xurizaemon ● www.fuzion.co.nz

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • CiviCRM + Drupal Views: Filter options... dropdown, autofill?

This forum was archived on 2017-11-26.