webworka/Tagedit — Issue #18: Does not work on single input field
Author: tejinderss
Created: 2011-11-07 09:13:38+00:00
State: open

I have a single input field and i want to apply tagedit to it so that i can pass the local source data to it and it should return comma separated tags to the backend. For example:

var localJSON = [
{ "label": "Hazel Grouse", "value": "Hazel Grouse" },
{ "label": "Common Quail",	"value": "Common Quail" },
{ "label": "Greylag Goose", "value": "Greylag Goose" }
];

$('input#test').tagedit({
autocompleteOptions: {
source: localJSON,
},
});

If i dont rename my input to "test[]" it gives error saying dow does not match the regular expression. And there is no indication in documentation what does this figures in [] denote? I just want to apply tags to input field so that it should return the comma separated string, like if i select 2 tags "Hazel Grouse" and "Common Quail", it should pass to input id test as "Hazel Grouse, Common Quail". Is it possible. Please guide.