Cancellation Survey

Cancellation Survey Form Template

                        

    
        Survey.StylesManager.applyTheme("default");
    


var json = {
  "title": "Cancellation Survey",
  "description":  "Thank you for using our service. We would highly appreciate if you would take the time to fill our cancellation survey. This would help us improve the service.",
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "radiogroup",
     "name": "using_duration",
     "title": "How long have you been using the service?",
     "choices": [
      "Less than a month",
      "1-6 months",
      "7-12 months",
      "1-3 years",
      "Over 3 years"
     ]
    },
    {
     "type": "radiogroup",
     "name": "using_frequency",
     "title": "How often did you use the service?",
     "choices": [
      "Once a week",
      "2 or 3 times a month",
      "Once a month",
      "Less than once a month"
     ]
    },
    {
     "type": "radiogroup",
     "name": "cancel_reason",
     "title": "What was the main reason for cancelling the service?",
     "hasOther": true,
     "choices": [
      "No longer need it",
      "It didn't meet my needs",
      "Found a better alternative",
      "Found a cheaper alternative",
      "Quality was less than expected",
      "Ease of use was less than expected",
      "Access to the service was less than expected",
      "Customer service was less than expected"
     ]
    },
    {
     "type": "radiogroup",
     "name": "satisfaction",
     "title": "Overall, how satisfied were you with the service?",
     "choices": [
      "Very Satisfied",
      "Satisfied",
      "Neutral",
      "Unsatisfied",
      "Very Unsatisfied"
     ]
    },
    {
     "type": "matrix",
     "name": "future_using",
     "titleLocation": "hidden",
     "columns": [
      "Definitely",
      "Probably",
      "Not Sure",
      "Probably Not",
      "Definitely Not"
     ],
     "rows": [
      {
       "value": "use_in_future",
       "text": "Will you use our service in the future?"
      },
      {
       "value": "recommend",
       "text": "Will you recommend our service to others?"
      }
     ]
    },
    {
     "type": "comment",
     "name": "service_improvements",
     "title": "How can we improve our service?"
    }
   ]
  }
 ],
 "showQuestionNumbers": "off"
};

window.survey = new Survey.Model(json);


    survey.onComplete.add(function(result) {
        document.querySelector('#surveyResult').textContent =
            "Result JSON:\n" + JSON.stringify(result.data, null, 3);
    });


function onAngularComponentInit() {
    Survey.SurveyNG.render("surveyElement", { 
        model: survey 
    });
}
var HelloApp =
    ng.core
        .Component({
            selector: 'ng-app',
            template: '<div id="surveyContainer" class="survey-container contentcontainer codecontainer"><div id="surveyElement"></div></div> '})
        .Class({
            constructor: function() {
            },
            ngOnInit: function() {
                onAngularComponentInit();
            }
    });
document.addEventListener('DOMContentLoaded', function() {
    ng.platformBrowserDynamic.bootstrap(HelloApp);
});


                    
<!DOCTYPE html>
<html>
<head>
    <title>Cancellation Survey Form Template, Angular2 Survey Library Example</title>


    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="https://npmcdn.com/zone.js/dist/zone-evergreen"></script>
    <script src="https://npmcdn.com/core-js@2.6.5/client/shim.min.js"></script>
    <script src="https://npmcdn.com/rxjs@5.0.0-beta.6/bundles/Rx.umd.js"></script>
    <script src="https://npmcdn.com/@angular/core@2.0.0-rc.5/bundles/core.umd.js"></script>
    <script src="https://npmcdn.com/@angular/common@2.0.0-rc.5/bundles/common.umd.js"></script>
    <script src="https://npmcdn.com/@angular/compiler@2.0.0-rc.5/bundles/compiler.umd.js"></script>
    <script src="https://npmcdn.com/@angular/platform-browser@2.0.0-rc.5/bundles/platform-browser.umd.js"></script>
    <script src="https://npmcdn.com/@angular/platform-browser-dynamic@2.0.0-rc.5/bundles/platform-browser-dynamic.umd.js"></script>
<script src="https://surveyjs.azureedge.net/1.1.19/survey.angular.js"></script>
<link href="https://surveyjs.azureedge.net/1.1.19/survey.css" type="text/css" rel="stylesheet" />
    <link rel="stylesheet" href="./index.css">

</head>
<body>
            <ng-app></ng-app>
    <div id="surveyResult"></div>

<script type="text/javascript" src="./index.js"></script>

</body>
</html>