TagBox Custom Widget

Source code: Survey setup
Survey.defaultBootstrapCss.navigationButton = "btn btn-primary";
Survey.Survey.cssType = "bootstrap";
var survey = new Survey.Model({
    pages: [
        { name:"page1", questions: [
            { type: "checkbox", isRequired:true, choicesByUrl: { url: "https://restcountries.eu/rest/v1/all" }, name: "countries", title: "Please select all countries you have been for the last 3 years." }
        ]}
    ]
});


var widget = {
    name: "tagbox",
    htmlTemplate: "<div data-bind='dxTagBox: { items: question.koVisibleChoices, value: question.koValue, searchEnabled: true, displayExpr: \"text\", valueExpr: \"value\" }'></div>",
    isFit : function(question) { return question.name == 'countries'; },
}
Survey.CustomWidgetCollection.Instance.addCustomWidget(widget);