Alain Ravet
2006-May-23 05:17 UTC
comma separated autocompletion, like in Google Bookmarks, GMail, ..
Hi list, Hi all, In Google Bookmark and GMail -f.ex.-, autocompletion would help you enter multiple values in 1 field, separated by commas. Is there such a solution available somewhere? This is necessary for the acts_as_taggable plugin, to let people enter many tags in one file ex: "rails, ruby, plugin" but with the help of some AJAX magic. Without it, people have no clue about the existing tags, and there''s no way to keep them from creating slight variations - singular/plural, diff. casing, ..-., and it makes the who tag system much less useful. TIA Alain
Maninder, Singh
2006-May-23 05:29 UTC
RE: comma separated autocompletion, like in Google Bookmarks, GMail, ..
>From the wiki -Tokenized autocompletion Tokenized incremental autocompletion is enabled automatically when an autocompleter is instantiated with the ''tokens'' option in the options parameter: new Ajax.Autocompleter(''id'',''upd'', ''/url/'', { tokens: '','' }); will incrementally autocomplete with a comma as the token. Additionally, '','' in the above example can be replaced with a token array, e.g. tokens: ['','', ''\n''] } which enables autocompletion on multiple tokens. This is most useful when one of the tokens is \n (a newline), as it allows smart autocompletion after linebreaks. Regards, Mandy.
Alain Ravet
2006-Jun-01 16:10 UTC
Re: comma separated autocompletion, like in Google Bookmarks, GMail, ..
> Tokenized autocompletion> new Ajax.Autocompleter(''id'',''upd'', ''/url/'', { tokens: '','' }); In Rails, it translates to <%= text_field_with_auto_complete :tagz, :list ,{},{:tokens => ['','', ''\n'']} %> Thanks a lot Mandy.