Closed (outdated)
Project:
Autocomplete Deluxe
Version:
7.x-1.x-dev
Component:
Code (miscellaneous)
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Mar 2011 at 11:01 UTC
Updated:
15 Sep 2024 at 15:43 UTC
Jump to comment: Most recent
Comments
Comment #1
sepgil commentedCurrently I don't have any plans to do something like that, since I'm currently working on getting a stable release. After that I'll probably will work on my other module...
Comment #2
johnvOK, that would be the 'autocomplete for references' module...
Comment #3
dgastudio commentedit was really easy
function custom_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'views_exposed_form' && $form_state['view']->name == 'your_view_name') {
$form['field_symptoms_tid'] = array(
'#type' => 'autocomplete_deluxe',
'#autocomplete_deluxe_path' => url('autocomplete_deluxe/taxonomy/your_exposed_filter_field', array('absolute' => TRUE)),
'#multiple' => TRUE,
'#autocomplete_min_length' => 0,
'#autocomplete_multiple_delimiter' => ',',
);
};
}
maybe add it to documentation?
Comment #4
dgastudio commentedchanging status
Comment #5
henrijs.seso commentedSnippet from kervi works indeed, here is same snippet with some formatting.
Note on YOURFIELDMACHINENAME - it has to be term reference field machine name in form of 'field_*'. Note on views setup - exposed filter settings should be set to autocomplete.
Comment #6
emptyvoid commentedPretty nifty, couldn't we add a autocomplete_deluxe.views.inc that registers a filter display format as "Auto Complete Deluxe"?
autocomplete_deluxe.module
function autocomplete_deluxe_views_api()
This would register which version of views it is compliant with.
function autocomplete_deluxe_form_views_exposed_form_alter()
This would register the new filter over autocomplete fields where the user has selected the field use auto complete deluxe instead of the default auto complete.
autocomplete_deluxe.views.inc
function autocomplete_deluxe_views_data_alter()
This method would add the handler for processing the autocomplete string?
I'm a little fuzzy what and where the GUI elements should be placed either in the settings for each field or in the form settings section.
Thoughts?
Comment #7
MGParisi commentedEmptyvoid, can you release a Patch? I would test it!
Comment #8
emptyvoid commentedThe only rub is, as I found out with a custom module is that in order for auto_deluxe to work for different entities you'd have to use sub-modules like references or entity_references to provide the autocomplete results. The autocomplete deluxe default behaviour is for taxonomy only (I could be wrong here).
So we'd need to provide multiple autocomplete paths based on the entity type
Comment #9
merilainen commentedI'm trying to use this with search_solr_autocomplete. I got the suggestions to work, because there is a path for the suggestions available. But changing the delimiter from ',' to '+' doesn't affect the URL, it still has %2C (comma).
Here is my stab at this:
Comment #10
digitopo commentedEdit 2: Got it working... thanks a lot! (I just hand to specify the correct form names etc)
EDIT: Stupid... forgot to put <?php?> tags around code in the .module file... Error is gone but still don't get the autocomplete deluxe widget.
Disregard:
I'd really like to use this feature... but after following the steps in #5 I am getting AJAX errors. Autocomplete widget doesn't show up, then when I start to enter a value in the search field (which is a regular autocomplete for taxonomy terms) I get the error.
I'm using a view with ajax enabled and Better Exposed Filters.
Anyone have some advice on how to get this to work?
Where is this path coming from?
#autocomplete_deluxe_path' => url('autocomplete_deluxe/taxonomy/YOURFIELDMACHINENAME', array('absolute' => TRUE)),Here is the error I get:
Comment #11
junetellain626 commentedI got the code working from #3. The problem now is using my taxonomy exposed filter, it tries to create new terms when what I type does not exist in my vocabulary list (which is somehow an autocomplete deluxe feature by default). What code do i need to add in #3 to deny the creation of new terms ?
Comment #12
sepgil commentedIf someone implements this feature, she/he should do it as seperate module (like https://drupal.org/project/acdx_references) or for now at least in a sandbox.
Comment #13
rcodinaWhy not implent this inside the module? Like @johnv stated users want same widgets on node edit forms and view forms. I think this would bring a key feature for this module. Can anyone please post a patch?
Comment #14
x.flimon@gmail.com commentedHi,
@junetellain626 : Did you come up with a solution to prevent creating new taxonomy items?
I'm stuck with the same issue..
Thanks
Comment #15
LNakamura commentedHi, all - we have no plans for adding support for additional entities to Autocomplete Deluxe.
That said, the following are available, and I believe should address most, if not all, of the questions above:
Try them out and let us know!
Comment #16
rajab natshah