I trying to add ability to adding own entry on list.
It's not even working when I left just
var data = new Array();
placeholder: "Enter name of city",
It seems there's an issue with the input tag, change it to a select instead.
Deprecated in Select2 4.0. It is now encouraged to use the select tag instead.