Sachu
Sachu

Reputation: 7766

jQuery tokeninput create new textbox automatically

I am using jQuery tokeninput plugin in my Razor MVC5 view and it is working fine for searching data from database but I am facing one issue.

@Html.TextBoxFor(model => model.code, new { id = "diag", @class = "diag " })

and tokeninput is attached to the class "diag" as

$(".diag").tokenInput("@Url.Action("Search", "approval")");

so it is working fine for all the input having class diag. But if you select the value searched it automatically create another texbox in next line. I searched a lot for a solution.

Has anyone come across an issue like this? Please help me to solve this.

Thanks in Advance

Upvotes: 0

Views: 295

Answers (1)

neo x
neo x

Reputation: 51

I think this is css related issue.you need to use the tokeninput css.

<link href="your path/token-input.css" rel="Stylesheet" type="text/css" />

Upvotes: 1

Related Questions