I have seen that there is an issue marked as Won't Fix here #413330: views integration, in order to no hijack issues I'm opening one new.
Since Views 3 is not ready yet, use this code is not recomended for productions sites, even for tests either. At least until views 3 alpha 2 be released.
So, why Views 3 integration. Views 3 comes with a new kind of plugin called Exposed Forms. This plugin allows modules to override the functionality of exposed forms without implement hook_form_alter in a custom module.
This patch provides a plugin based on exposed form basic, it is very small and provides an UI to select wich exposed filters (only text or numeric autocomplete widgets cck fields) should be used as autocompletable widgets.
I'm leaving this issue as postponed works in order to wait until views alpha 2 be ready.
If you insist to test this patch before Views-6--3-alpha-2 be released :), you need to apply this patch to the last views 3 development version in order to can expose filters:
Comment | File | Size | Author |
---|---|---|---|
autocomplete_widget_views_integration.patch | 4.17 KB | dagmar | |
Comments
Comment #1
markus_petrux CreditAttribution: markus_petrux commentedSure, Views 3 looks like it will come with a lot great stuff. Thanks for this patch!
Unfortunately, I'm tied to Views 2 at this moment, so aside from waiting to Views 3 with all the stuff already in place (alpha or beta, etc.), I would appreciate feedback from testing.
Comment #2
dagmarNow that views 3 alpha-2 was released we can start to test this patch
Comment #3
dagmarComment #4
gilcpd CreditAttribution: gilcpd commentedI installed the patch and enabled "Auto complete widget" on Views form exposed. How do I add the view to the field now? :S
Comment #5
dagmar@glicpd: this patch doesn't do that. This patch only enables you to use an exposed filter with autocomplete capabilities. You cannot use a view as the source for an autocomplete field, sorry.
Comment #6
markus_petrux CreditAttribution: markus_petrux commented@dagmar: Thanks again for the patch. I have committed a slight variation, with a few doxygen comments, and also an attempt to fix something that seemed to me it was missing in the plugin handler: initialization of the $relationships array, which I think it comes from the $this->view->relationship array.
Also, I have moved Views stuff to its own subdirectory.
You may want to check out from CVS, or wait for the next nightly built of the dev package.
I'm marking this fixed, but it could be re-opened in case there's anything missing or not working properly. I'm going to create a new "Component" for the issues queue as "Views integration" too.
I decided to go ahead and commit because this is the first change after the latest stable release, and there's no other stuff planned in the short term, so people can easily test this feature using the atest dev package.
Comment #7
markus_petrux CreditAttribution: markus_petrux commentedComment #9
Beatle88 CreditAttribution: Beatle88 commentedHi,
I have a slight problem - I can see the Autocomplete widgets option on the exposed form, however, when I update the display (after selecting the autocomplete option) the exposed form reverts back to the previous option I had selected. Any ideas about why this might happen?
Thanks
Comment #10
sketman CreditAttribution: sketman commentedThe same problem here...
Comment #11
george.plescan CreditAttribution: george.plescan commentedI have the same problem on Drupal 7. For the Exposed form style settings it doesn't change to Autocomplete.
I use Views 3 dev.
off: I tried using another autocomplete module Views Autocomplete Filters. After I adapted it to Drupal 7 it had a checkbox for autocompletion which also didn't stay activated...
Comment #12
markus_petrux CreditAttribution: markus_petrux commentedThe original request was already addressed.
Please, open a separate issue for each different problem. Thanks.
Comment #13
george.plescan CreditAttribution: george.plescan commentedI have tested both the 6 and 7 version of the module to see if the views integration is working.
So far none of them save the autocomplete option. Please can anyone specify if the integration works and in what configuration.
I have tested both on drupal core fields and cck fields with the widget enabled in the content type structure.
Comment #14
SchwebDesign CreditAttribution: SchwebDesign commentedsubscribing. any updates on this? I very much need this to work for views 3 as well. I'll likely be testing the patch above, but from what #13 says that's not working. I'd be willing to pay someone to implement this (and share with community) if any one is interested!