Friday, March 17, 2017

Using bootstrap multiple autocomplete tags

I have a table news with id, title, body and another table tags with id, name. These two tables are related by a pivot table news_table with news_id, tag_id. Relations are created on modals and foreign key constraints are set on the pivot table. I have a controller manageData containing a function insertNews and a form in a view where i get the data entered.

What i want to do is have a field in my form like a text input field which will act like a dropdown where i can add multiple words as tags which will be taken from the tags table and shown to me as suggestions. if the word doesn't exist in my tags table i want it to be added there

I have tried some methods but with no success



via Ardit Mata

Advertisement