开发者

Drupal 7 grouping of autocomplete suggestions

I have an places autocomplete textfield. With the core drupal autocomplete i am able to show suggestions of places开发者_JAVA技巧.

Now i need to group these suggestions by type à la OS X spotlight. Example :

  • Hotels (34)
    • Hotel 1
    • Hotel 2
    • ...
  • Restaurants (65)
    • Restaurant 1
    • ...

How do i override drupal's autocomplete to achieve this ? Or should i build this independently from drupal's autocomplete ?


(Reference: http://bitnr.drupalgardens.com/content/autocomplete-callbacks-drupal-7-or-fun-dbqueryrange-and)

I believe you only get to return a flat array, similar to D6.

I would solve this with jQuery and AJAX.


HI please check the link , i have posted my comments here with sample code http://drupal.org/node/1197448

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜