开发者

CakePHP: Autocomplete for multiple tags in one textfield

开发者 https://www.devze.com 2023-01-20 00:49 出处:网络
I want to use the autocomplete component for cakephp but instead of just autocompleting one value i开发者_开发技巧n a textfield i want it to work like SOF tags. i.e. one tag, 2nd tag, ...

I want to use the autocomplete component for cakephp but instead of just autocompleting one value i开发者_开发技巧n a textfield i want it to work like SOF tags. i.e. one tag, 2nd tag, ...

Does anyone know if there is an option for this using this component?

thanks,

Jonesy


You should look at using jQuery UI Autocomplete, which has a demo of this functionality here:

http://jqueryui.com/demos/autocomplete/#multiple

You should not need a Cake component for this, just include the jQuery code to do what you want, and attach it to a regular Cake form field. You can either include the values in the script when it loads, or return them from a controller method (using the RequestHandler to return JSON).

0

精彩评论

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