TimSchlechter/bootstrap-tagsinput — pull request #124 by nguyenk (2014-04-16 15:19:17+00:00)
Title: Adding mixed mode support : allow freeInput AND objects as tag simultaneously

This pull request improves proposal of issue #104.

The idea is to allow entering at the same time free input AND objects as tags.

In order not to mix ids and text in the same tag, we decided to add an alternative input element that will receive the free input values.

```html

```

```js
$('#tags').tagsinput({
itemValue: 'id',
itemText: 'label',
typeahead: {
source: function(query) {
return $.getJSON("request.json?query="+encodeURIComponent(query));
}
},
freeInput: true,
freeElementSelector: "#freeTexts"
});
```

Since `itemValue` and `freeInput` are set in the options, we must add an alternative input field (`#freeTexts`) that will receive the texts.

This is cleaner because we don't mix `#tags` that contains IDs with `#freeTexts` that contains text.