3

I am using autocomplete exposed filter in views for country/city with depth which is working fine but there are many identical city names.

When user types XYZ he sees 2 entries: "XYZ" "XYZ" and has no clue which one belongs to which country.

I would like to show depth of the tree: "ABC-XYZ" "DEF-XYZ" in autocomplete.

3
  • Checking I've understood this right: so you might have an entry, "London" under "United Kingdom" and another entry "London" under "Canada" (for the city London in Ontario) - and the problem is, in the autocomplete, both show up as just "London", with no clue as to which is which? Commented Nov 18, 2012 at 19:04
  • Yes, you explained it much better :)
    – Azz Kawa
    Commented Nov 19, 2012 at 6:42
  • Any idea how to make this work ?
    – Azz Kawa
    Commented Nov 21, 2012 at 19:20

2 Answers 2

0

Hierarchical Term Reference Autocomplete module have the option to show the children with their parent.

enter image description here

This module provides a new widget for a term reference field that displays the parents of a term matching the autocomplete as well as providing actual TIDs back to the form handlers.

1
  • It is nice module but does not work as views exposed filter. I did try to use it creating node which has taxonomy field of Country/City (around 85.000 terms). I waited around 20sec after entering "london" but nothing came up so i am back to autocomplete deluxe.
    – Azz Kawa
    Commented Nov 27, 2013 at 20:33
0

Try Views Reference Filter. Basically you create a second view of type entity reference, which will be used to provide options for the exposed filter in the main view. In this way you can customize how the options will be displayed. For the autocomplete widget you have to apply this patch.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.