survey feedback quiz system - Free Download Advanced Survey/Feedback/Quiz System - SurveyJS

Free Download Advanced Survey/Feedback/Quiz System – SurveyJS

Posted on

This time I will share jQuery Plugin and tutorial about Advanced Survey/Feedback/Quiz System – SurveyJS, hope it will help you in programming stack.

survey feedback quiz system - Free Download Advanced Survey/Feedback/Quiz System - SurveyJS
File Size: 1.55 MB
Views Total: 5153
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

SurveyJS is a robust, customizable, cross-platform Survey/Feedback/Questionnaire/Quiz JavaScript library designed for jQuery, Angular, React, VueJS, knockout, etc.

Main features:

  • Supported question types: input, radio, checkbox, dropdown, matrix, rating, image picker, comment, custom function, etc.
  • Share data between questions.
  • Print to PDF.
  • Analyze survey results.
  • Supports condition logic.
  • Markdown and Text Processing.
  • Multiple languages.
  • Form validation.
  • 8 built-in themes.
  • Supports 3rd plugins: select2, jQuery UI date picker, Nouislider, and much more.

Basic usage (jQuery):

1. Include jQuery library and the SurveyJS library’s files on the page.

1 <script src="/path/to/cdn/jquery.min.js"></script>
2 <script src="/path/to/survey.jquery.js"></script>
3 <link href="/path/to/survey.css" type="text/css" rel="stylesheet"/>

2. Define your questions using JSON. You can build your own JSON using the online survey editor.

01 var json = {
02     "completedHtml": "<h3>Thank you for your feedback.</h3> <h5>Your thoughts and ideas will help us to create a great product!</h5>",
03     "completedHtmlOnCondition": [
04         {
05             "expression": "{nps_score} > 8",
06             "html": "<h3>Thank you for your feedback.</h3> <h5>We glad that you love our product. Your ideas and suggestions will help us to make our product even better!</h5>"
07         }, {
08             "expression": "{nps_score} < 7",
09             "html": "<h3>Thank you for your feedback.</h3> <h5> We are glad that you share with us your ideas.We highly value all suggestions from our customers. We do our best to improve the product and reach your expectation.</h5>n"
10         }
11     ],
12     "pages": [
13         {
14             "name": "page1",
15             "elements": [
16                 {
17                     "type": "rating",
18                     "name": "nps_score",
19                     "title": "On a scale of zero to ten, how likely are you to recommend our product to a friend or colleague?",
20                     "isRequired": true,
21                     "rateMin": 0,
22                     "rateMax": 10,
23                     "minRateDescription": "(Most unlikely)",
24                     "maxRateDescription": "(Most likely)"
25                 }, {
26                     "type": "checkbox",
27                     "name": "promoter_features",
28                     "visibleIf": "{nps_score} >= 9",
29                     "title": "What features do you value the most?",
30                     "isRequired": true,
31                     "validators": [
32                         {
33                             "type": "answercount",
34                             "text": "Please select two features maximum.",
35                             "maxCount": 2
36                         }
37                     ],
38                     "hasOther": true,
39                     "choices": [
40                         "Performance", "Stability", "User Interface", "Complete Functionality"
41                     ],
42                     "otherText": "Other feature:",
43                     "colCount": 2
44                 }, {
45                     "type": "comment",
46                     "name": "passive_experience",
47                     "visibleIf": "{nps_score} > 6  and {nps_score} < 9",
48                     "title": "What is the primary reason for your score?"
49                 }, {
50                     "type": "comment",
51                     "name": "disappointed_experience",
52                     "visibleIf": "{nps_score} notempty",
53                     "title": "What do you miss and what was disappointing in your experience with us?"
54                 }
55             ]
56         }
57     ],
58     "showQuestionNumbers": "off"
59 };

3. Create a container to place the survey.

1 <div id="myContainer"></div>

4. Generate a surver form from the JSON you provide.

1 window.survey = new Survey.Model(json);
2 $("#myContainer").Survey({
3   model: survey,
4   onComplete: sendDataToServer
5 });

5. The example JS that shows how to send the results to your server.

1 function sendDataToServer(survey) {
2   var resultAsString = JSON.stringify(survey.data);
3   // send the resultAsString to the server
4 }

6. The example JS that shows how to send the results to your server.