Hello everyone,
I am using the Autocomplete widget for CCK text and number.
I have a content type "song" with a field "band" (the band who made the song). The field "band" has more than 4000 allowed values.
For this reason, the autocomplete is much better than the drop down select box (barely usable).
I made a views exposed filter block to help users search songs and filtering by band.
My question is : if this autocomplete works and displays so well when the content is being created, why is it not displayed in the views exposed filter? I can't expect users to scroll down 4000 values, and moreover it's not even in alphabetical order.
Is this a bug or is this normal?
If it is normal, I'm interested in a fix.
My current idea is to add in autocomplete_widget.module, in function autocomplete_widgets_form_alter(&$form, $form_state, $form_id) {}, the following lines :
if ($form_id == 'my_form_id' && isset($form['widget'])) {
module_load_include('inc', 'autocomplete_widgets', 'autocomplete_widgets.admin');
_autocomplete_widgets_content_field_edit_form_alter($form, $form_state);
}
where "my_form_id" is the id of my form.
also as a beginner I'm not sure what is the id of my form, because when I use the "web developer" firefox addon, right click on the form and chose to display form information, I get this result :
id = "views-exposed-form-search-bands-page-1" method = "get">
so there are 3 form ids and I dont know which one is the correct one.
1. How to know what is the id of views exposed filter form?
2. How to activate autocomplete widgets CCK in it?
Thanks!
Comments
Comment #1
Taesto commented(the web developer info was removed in previous post because I had left the "higher than" and "lower than" signs)
form action = "/jazznation/searchband"
id = "views-exposed-form-search-bands-page-1" method = "get"
select id = "edit-band" name = "band"
input id = "edit-submit-search-bands"
Comment #2
yesct commentedI'm wondering this too.
Comment #3
drupalnesia commentedMake sure you add the field of autocomplete to Views-fields.
Example: suppose you want node title become autocomplete in views exposed filter. Then you must:
1. add node title to Views - fields
2. add node title to Views - filter - exposed
Comment #4
Taesto commentedI use Drupal 7 now and with Taxonomy it all works out of the box
Comment #5
trofimchouk commentedI have the same problem with the latest Views3, CCK and Drupal6.
Autocomplete for text-cck-field works on node edit page, but desn't work in exposed filter for this field.
Comment #6
zilla commentedditto on D7 with views3 and latest RC of this module.
any idea why this is happening? even when using Better Exposed Filters, i can see an odd scenario where there is NO option (drop down, etc) presented for the Text Field in which i have used this module. however, it does work on the edit node side of things...
Comment #7
zilla commentedupdate: i found a very, very easy solution to this by using Views Autocomplete Filter for the text field
https://drupal.org/project/views_autocomplete_filters
important note: you need to set the master display to also use the same field and filter or you will keep getting an annoying error (there's info on the project page, very simple fix)
Comment #8
OanaD commentedViews Autocomplete Filter totally worked for me too, thank you! (Re: master display issue, I think they phased out the master display all together in my core version, which is 7.56).