Autocomplete for nodereference Views exposed filter
Aren Cambre - June 30, 2009 - 21:31
| Project: | Content Construction Kit (CCK) |
| Version: | 6.x-2.x-dev |
| Component: | Views Integration |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
Please support autocomplete in Views exposed filters for nodereferences. Currently nodereference exposed filters are either a dropdown or multiselect. Either way is painfully difficult if you have a huge list of candidates, especially when sorting needs don't result in a data list that works well with either kind of selector.

#1
I agree, the autocomplete widget in node reference is not reflected in exposed filter in views. This makes nodereference filters painfull to use...
#2
I'm afraid this will be falling down the queue unless someone can come up with a patch for review. Postponing until that happens.
#3
+1
Want
#4
Subscribing....
#5
Suscribing too ...
#6
I've rolled a patch that does this. Seems to work for me for both user and node reference, although I have not extensively tested.
I've also added the ability to select multiple nodes in the one node reference widget the same way as taxonomy auto-complete by comma separating values. This only works when "force single" is unchecked.
Not 100% sure on the approach I've taken, so reviews appreciated.
#7
#8
I've added your patch but I don't see how to choose an autocomplete widget in my exposed filter. My node reference field is an autocomplete but even after applying your patch, I see no way to get rid of the select list in my exposed filter in Views.
#9
If the patch is working correctly, it should be the first option you choose when creating a new nodereference filter. I can't explain it any better, as I'm not sure exactly what it's called. It's one of the base options, not one of the extra options. Can you see the choice when creating a new nodereference filter?
#10
+1 Important feature !
#11
Quick note: although I haven't closely reviewed the code (and I must admit I'm much more familiar with the internals of Views than CCK), I tested patch #6 on a site with Views 6.x-2.7 and CCK 6.x-2.6 and it appears to work beautifully. Here are some screenshots of the patch in action on an admin view I created to do advanced filtering of products on a bookstore site I'm working on. The author, editor and foreword fields are all node references to person nodes that represent authors and such. First two are shots of editing the view -- you see the overview of the filters and now the noderef filters have the gear icon to configure them. Then you see what you get when you click the gear -- a choice of exposed filter widget type. Then are two shots of the actual view -- what you see when you first load the page and once you auto-complete an author name and apply the filter. Before, this page was a bit painful to load (and use) with giant select boxes with close to 1000 options in them. Now, it's nice and snappy and much more usable. Yay!
#12
Does not return any names for me.. could it be because i'm using the realname module?