jqueryruby-on-railsjquery-tokeninput

In rails, jQuery token input is not allowing custom entry


In rails, jQuery token input is not allowing custom entry.

I have downloaded 1.6.0 version of token input but i can't enter custom entry. As soon as i enter some text in a text box & take out cursor, the text will disappears. Only i need to select from auto completion list.

Eg :- If i am using below kind of script function, what will be the solution ?

<pre>
<script type="text/javascript">
tokenInput("SOME_ID", "/token_input/name");

function tokenInput(text_box_id, url){
    jQuery("#" + text_box_id).tokenInput(url, {
      allowCustomEntry: true,
      preventDuplicates: true,
      theme: "facebook",
    });
  }
</script>
</pre>

Please give me the solution for this, token input should allow the custom entry.


Solution

  • This should hopefully be fixed soon in the Tokeninput master branch, but in the meantime, merging this branch into your own fork should fix this for you.