Questions tagged [jquery-tokeninput]

Tokeninput is a jQuery plugin which allows your users to select multiple items from a predefined list, using autocompletion as they type to find each item. You may have seen a similar type of text entry when filling in the recipients field sending messages on facebook.

Overview

Tokeninput is a jQuery plugin which allows your users to select multiple items from a predefined list, using autocompletion as they type to find each item. You may have seen a similar type of text entry when filling in the recipients field sending messages on facebook or entering email-ids in Gmail compose pop-up window.

Features

  • Intuitive UI for selecting multiple items from a large list
  • Easy to skin/style purely in css, no images required
  • Supports any backend which can generate JSON, including PHP, Rails, Django, ASP.net
  • Smooth animations when results load
  • Select, delete and navigate items using the mouse or keyboard
  • Client-side result caching to reduce server load
  • Crossdomain support via JSONP
  • Callbacks when items are added or removed from the list
  • Preprocess results from the server with the onResult callback
  • Programmatically add, remove, clear and get tokens
  • Customize the output format of the results and tokens

Screenshots

enter image description here

enter image description here

More at: http://loopj.com/jquery-tokeninput/

279 questions
19
votes
8 answers

jQuery Tokeninput add if not exists

I am in the process of writing a script that builds upon user input, I have some fields that its values need to be quired from the database, and if no entry found I want to add a new value so the next user will find it through autocomplete. I…
Frank
  • 534
  • 1
  • 5
  • 15
18
votes
4 answers

Uncaught TypeError: Cannot use 'in' operator to search for '' in JSON string

I've use token input in my website, and here's how I initialize the token input: $(document).ready(function () { var populateValue = document.getElementById('<%= hiddentokenPrePopulate.ClientID%>').value $("#<%=…
User2012384
  • 4,769
  • 16
  • 70
  • 106
15
votes
4 answers

Trouble interacting with Bootstrap modals via Capybara (v2)

In a Rails application I'm trying to test a Bootstrap modal with a jQuery TokenInput field in Rspec using Capybara with the capybara-webkit driver. The portion in question is as follows: click_link 'Create Team Modal' sleep…
9
votes
2 answers

jQuery Token Input (tokenize input) is not working on modal popup, list hidden under popup

I am using a modal popup up control in jQuery, the popup has an input text powered by jQuery Tokenize input plugin. The problem is when i type something on modal popup text box, the search results by tokenize plugin are shown hidden under the popup.…
Kamran
  • 591
  • 1
  • 5
  • 9
7
votes
4 answers

tokenInput as angular.js directive

I'm attempting to create an angular.js directive from James Smith's tokenInput Jquery plugin: http://loopj.com/jquery-tokeninput Here is what I have so far: antdna = angular.module('Communication', []); antdna.factory('autoCompleteService',…
Mark Kenny
  • 1,598
  • 2
  • 17
  • 30
6
votes
2 answers

Facebook jQuery autocomplete plugin for textarea & free text

Is there a jQuery plugin, similar to Facebook, that suggests/autocompletes with this criteria: Works for a textarea or contenteditable div. I'm finding many plugins that only support input fields (ex. http://loopj.com/jquery-tokeninput/). Supports…
Chandrew
  • 16,987
  • 4
  • 24
  • 40
6
votes
2 answers

How to use jquery tokeninput in Rails?

I'm trying to add a tokeninput jquery field in a form in my app that allows users to post status updates. I want users to be able to attach works (a separate model) to the status update. I'm using the act_as_taggable_on gem and my query specifies…
winston
  • 3,000
  • 11
  • 44
  • 75
5
votes
0 answers

jquery not loading (tokeninput) in Rails app

I'm trying to follow along with the instructions on how to implement jquery-tokeninput here: How to use jquery-Tokeninput and Acts-as-taggable-on I am trying to attach tags to a "post". I can use the text field in my form to create new tags.…
winston
  • 3,000
  • 11
  • 44
  • 75
5
votes
1 answer

create tokens in jquery token input

Presently my jquery token input is working perfectly fine. Am not able to create token, which is not in the list I have seen here, that this functionality is implemented. But there is no documentation on how we i can use this. Can any one help me…
Ashwin Yaprala
  • 2,737
  • 2
  • 24
  • 56
5
votes
1 answer

Ruby on Rails - JS Input token, an issue when validation fails

I have a company model which can have many tags. It works fine, but in one occasion it does not work. The occasion is when company model validation fails. After :render => 'edit' it does not show tags in the view. I suspect the data-pre is not…
MJM
  • 61
  • 4
4
votes
1 answer

Jquery Tokeninput & Dynamic Nested Forms

I am using the setup of the R.B. railcast - #197 Nested Model Form Part 2 to dynamically add fields to the form but i am having issues getting the Tokeninput fields to work. Form: <%= form_for(current_user, :url => user_products_path) do |f| %> …
LearningRoR
  • 26,582
  • 22
  • 85
  • 150
4
votes
2 answers

Dynamic Autocompletion in Rails, using the jQuery TokenInput Plugin

I'm using the great TokenInput plugin (http://loopj.com/jquery-tokeninput/) for rails to do some autocompletion and for a normal set of data in a model it works just wonderfully. But my problem is, that in my case I have actually 2 textboxes I want…
4
votes
2 answers

How To add a placeholder to jQuery Tokeninput?

How can I add a placeholder to a jQuery Tokeninput field? A normal placeholder attribute won't work in here.
THpubs
  • 7,804
  • 16
  • 68
  • 143
3
votes
2 answers

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…
Shruthi R
  • 1,863
  • 4
  • 39
  • 77
3
votes
1 answer

Virtual attribute validation Rails 3

I have not done a whole lot with this Jquery-tokeninput or Rails virtual attributes but have been slamming my head against the wall with this one. Any help or guidance is appreciated. I have a virtual attribute reader in my announcement model which…
Yuri
  • 1,261
  • 1
  • 11
  • 23
1
2 3
18 19