Make use of the tokenValue
parameter during set up.
e.g. In jQuery
<script type="text/javascript">
$(document).ready(function () {
$("#my-text-input").tokenInput("${createLink(controller: 'product', action: 'tags')}",{
theme: "facebook",
allowFreeTagging:"true",
tokenValue:"name"
});
});
</script>
This will submit an array of names
instead of IDs. If you need both name's and id's, you're probably best adding a custom attribute to each token through an onAdd
parameter, and then setting that to the tokenValue
.