Facebook
From wsqn, 4 Years ago, written in PHP.
Embed
Download Paste or View Raw
Hits: 211
  1.  
  2. <!DOCTYPE html>
  3. <html>
  4.  
  5. <head>
  6. <title>test</title>
  7. <meta charset="UTF-8">
  8.  
  9. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
  10. <script src="https://surveyjs.azureedge.net/1.1.17/survey.jquery.js"></script>
  11. <link href="https://surveyjs.azureedge.net/1.1.17/survey.css" type="text/css" rel="stylesheet"/>
  12.  
  13. <meta name="viewport" content="width=device-width, initial-scale=1">
  14.  
  15. </head>
  16.  
  17. <body>
  18. <div id="survey" class="running-survey-container" style="position:absolute;top:80;left:0;bottom:0;right:0;"></div>
  19. <div id="surveyContainer"></div>
  20.  
  21.  
  22.  
  23. <script>
  24.  
  25.  
  26. var surveyJSON = {locale:"pl",completedHtmlOnCondition:[{expression:"{question16} = 1",html:"DUPA 1"}],pages:[{name:"start",elements:[{type:"html",name:"question12",html:{pl:"reklama"}},{type:"html",name:"question11",html:{pl:"Witam, wciśnij start"}},{type:"html",name:"question13",html:{pl:"Jakis tekst"}}]},{name:"page1",elements:[{type:"rating",name:"question16"},{type:"checkbox",name:"question1",choices:["item1","item2","item3"]},{type:"imagepicker",name:"question5",choices:[{value:"lion",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/lion.jpg"},{value:"giraffe",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/giraffe.jpg"},{value:"panda",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/panda.jpg"},{value:"camel",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/camel.jpg"}]},{type:"rating",name:"question14"},{type:"matrixdynamic",name:"question15",columns:[{name:"Column 1"},{name:"Column 2"},{name:"Column 3"}],choices:[1,2,3,4,5]},{type:"html",name:"question10",html:{pl:"Reklama Labotiga/SQNS"}},{type:"dropdown",name:"question4",choices:["item1","item2","item3"]},{type:"radiogroup",name:"question3",choices:["item1","item2","item3"]}]},{name:"page2",elements:[{type:"imagepicker",name:"question2",choices:[{value:"lion",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/lion.jpg"},{value:"giraffe",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/giraffe.jpg"},{value:"panda",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/panda.jpg"},{value:"camel",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/camel.jpg"}]}]},{name:"page3",elements:[{type:"comment",name:"question6"},{type:"boolean",name:"question9",labelTrue:"Yes",labelFalse:"No"},{type:"boolean",name:"question8",labelTrue:"Yes",labelFalse:"No"},{type:"matrix",name:"question7",columns:["Column 1","Column 2","Column 3"],rows:["Row 1","Row 2"]}]}],showNavigationButtons:"both",showQuestionNumbers:"onPage",showProgressBar:"top",startSurveyText:{pl:"START"},firstPageIsStarted:true,showTimerPanel:"bottom"}
  27.  
  28. function sendDataToServer(survey) {
  29.     survey.sendResult('5cb2d62f-286d-443a-b74a-8cfaf93ccbd8');
  30. }
  31.  
  32. Survey
  33.     .StylesManager
  34.     .applyTheme("default");
  35.  
  36. var survey = new Survey.Model(surveyJSON);
  37. $("#surveyContainer").Survey({
  38.     model: survey,
  39.     onComplete: sendDataToServer
  40. });
  41.  
  42.  
  43.  
  44.  
  45. </script>
  46.  
  47.  
  48. </body>
  49. </html>