Finder Autocomplete relies on Drupal core's autocomplete functionality. This has hampered efforts to combat bugs, allow freedom for theming, and develop new features.

We need a new autocomplete system, and I think it should come in a separate module so that other modules can take advantage of it.

#1072108: categorize autocomplete results
#1149466: Allow to choice DOM element where to put suggestions

And also the auto-submit features that has a hackish implementation that uses a cloned .js file.

Comments

danielb’s picture

Another idea is that for debugging purposes it would be great if there was a config setting to prevent the autocomplete popup from closing, so it can be inspected through firebug, etc...

hedley’s picture

I use the handy web developer addon for FireFox (http://chrispederick.com/work/web-developer/) to disable javascript just when the autocomplete loads 'freezing' it so I can then inspect it properly with Firebug.

Also FYI incase anyone else ends up here while looking for a way to theme the autocomplete drop-down and get images etc showing, I use Display Suite with Node Displays to add in whatever fields I want to a custom layout then use this code to get it showing just what I want (Drupal 6):

function YOURTHEME_finder_autocomplete_suggestion($option, $finder_element) {
  $node = node_load($option->nid);
  $node->build_mode = 'YOURBUILDMODE';
  return node_view($node);
}

It would be great if Finder supported Display Suite out of the box after the revolution takes place.

danielb’s picture

Another little design issue with autocompletes, is that because they sort of have to do their own little 'search' and they don't have any configuration about how to put multiple field/values together, they inadvertently take on some of the configuration options used for submitted results. This either needs to be hardcoded to be consistent or to replicate the config choices in the form element fieldset.
This was discovered as part of #1198688: Wrong SQL when using multiple search fields

danielb’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
danielb’s picture

Component: Finder Autocomplete » Code

Autocompletes are now always handled by a custom javascript, rather than Drupal core. This opens to door to adding new features.

danielb’s picture

It would be good if you could do the autocomplete on 'title' and 'body' but the prefill/submission would be the nid or just the title, etc... this separation would make life easier for users

luco’s picture

@hedley would you know how can I theme the popup in D7? I'm completely lost on this one.

any help is greatly appreciated.

cheers

danielb’s picture

You cannot theme the popup in Drupal 7, use the rewrite setting instead.

danielb’s picture

Feature request for a minimum number of chars typed before activating autocomplete.

danielb’s picture

Status: Postponed » Closed (won't fix)

It is unlikely that I will have the time or motivation to lead this revolution, and since it was my idea I should probably close this issue.