loopj/jquery-tokeninput — pull request #483 by Mean-CJ (2013-02-27 22:13:20+00:00)
Title: Add callback function "onBeforeAdd"

- Remove onFreeTaggingAdd
- Add new callback function "onBeforeAdd"

Example for onBeforeAdd

if new a token add prefix on hidden value
aaa,new[token-value],bbb,ccc

onBeforeAdd: function(item, isNewToken)
{
if ( isNewToken === true )
item[this.tokenValue] = "new["+ item[this.tokenValue] +"]";

return item;
}