Hi there,

First of all, great great module. Thanks.
Nonetheless I'm using this tool to make sure users do not select taxonomy terms which would not return any results.
The issue is the taxonomy has hundreds of terms and select ro dropdown boxes do not really work for this purpose. Autocomplete would really help.

thanks in advance

Comments

maximpodorov’s picture

It's a not trivial change because of AJAX used in autocomplete widgets. So I'd prefer to wait for a patch from someone interested in this functionality.

antiorario’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new7.17 KB

This is my attempt at adding an autocomplete widget to the exposed filter. This is what the patch does:

  • adds an option to the filter settings, to choose between select list and autocomplete
  • adds the autocomplete menu item and callback
  • piggybacks as much as possible on existing functionality

Because of what I believe is a limitation of Entity Reference, the autocomplete field can search only in properties and fields of the main entity of the reference display.

Status: Needs review » Needs work

The last submitted patch, 2: entityreference_filter-autocomplete-2270315-2.patch, failed testing.

Status: Needs work » Needs review
antiorario’s picture

StatusFileSize
new7.16 KB

New patch.

The last submitted patch, 2: entityreference_filter-autocomplete-2270315-2.patch, failed testing.

maximpodorov’s picture

Any reviews?

luco’s picture

hello,

I'm interested. I'll try this patch out and let you know. many thanks!

cheers

luco’s picture

sorry, I tested the latest patch against the latest dev version and it didn't work.

antiorario’s picture

@luco What didn't work? Was the patch not applied, or did it not do what it was supposed to do? Any more details will be very helpful.

amirtaiar’s picture

I can confirm the patch at #5 work for me.
Thanks antiorario!

maximpodorov’s picture

Could anybody else confirm the patch solves the problem?

thelinhuk’s picture

I can confirm that patch #5 working perfectly .. it would be great if it doesnt show the node id on the filter..

antiorario’s picture

@thelinhuk That's how entity-reference autocomplete fields work, unfortunately. We have to sacrifice aesthetics for efficiency.

monsterplant’s picture

The patch is working great. However when I use it, it inserts a default value 'All' into the exposed field. Is there a way to remove this or translate it?

enboig’s picture

The #2270315-5: Add autocomplete widget patch works for me for single selection filters, but fail for multiple selection filters.

enboig’s picture

Could the "all" text be removed?

Thanks.

devad’s picture

Hi.

I didn't try Chosen module compatibility with Views Reference Filter module, so I don't know if my suggestion is completely valid... but for select lists with many items Chosen module can be handy in most cases.

lazzyvn’s picture

StatusFileSize
new6.64 KB

patch #5 is obsolete it doesn't work with new version (remove method get_view_args)
i repatch with new version

Status: Needs review » Needs work

The last submitted patch, 20: entityreference_filter_autocomplete.patch, failed testing. View results