Created
December 20, 2021 12:21
-
-
Save EDDYMENS/c3712a124a13afb8adf6fa998c3475fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| var questions = { | |
| "#index": { | |
| question: "Which service do you use?", | |
| options: [ | |
| { | |
| description: "a) Service Only", | |
| action: "#feedback-type" | |
| }, | |
| { | |
| description: "b) Service Delivery and Goods", | |
| action: "#extended" | |
| }, | |
| { | |
| description: "c) Product and services", | |
| action: "#feedback-type" | |
| }, | |
| { | |
| description: "d) Products Only", | |
| action: "#standalone" | |
| } | |
| ] | |
| }, | |
| '#feedback-type': { | |
| question: "Which customer feedback do you want to collect?", | |
| options: [ | |
| { | |
| description: "a) Star rating + written feedback", | |
| action: "#standard" | |
| }, | |
| { | |
| description: "b) Star rating + written feedback + added criteria of services", | |
| action: "#extended" | |
| } | |
| ] | |
| }, | |
| "#standard": { | |
| question: "", | |
| options: [ | |
| { | |
| description: "You need the Standard questionnaire. Click to read about it", | |
| action: "https://developers.etrusted.com" | |
| } | |
| ] | |
| }, | |
| "#extended": { | |
| question: "", | |
| options: [ | |
| { | |
| description: "You need the Extended questionnaire. Click to read about it", | |
| action: "https://help.etrusted.com/hc/en-gb/articles/360025749732-What-do-the-optimised-questionnaire-templates-offer-" | |
| } | |
| ] | |
| }, | |
| "#standalone": { | |
| question: "", | |
| options: [ | |
| { | |
| description: "You need the standalone questionnaire. Click to read about it", | |
| action: "https://developers.etrusted.com/questionnaire-api/questionnaire-api.html" | |
| } | |
| ] | |
| }, | |
| }; | |
| const iframe=document.getElementById("questionnaire");iframe.addEventListener('load',function(){var i=iframe.contentWindow;i.postMessage(JSON.stringify(questions),'*')}) | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment