{
  "@context": {
    "ixo": "https://w3id.org/ixo/ns/protocol/",
    "@id": "@type",
    "type": "@type",
    "@protected": true
  },
  "type": "ixo:entity#surveyTemplate",
  "question": {
    "title": "Yoma Survey Capabilities Demo",
    "description": "A walkthrough of every question type, built for the Yoma Impacts Exchange. A red star * means you must answer.",
    "logoPosition": "right",
    "pages": [
      {
        "name": "intro",
        "elements": [
          {
            "type": "html",
            "name": "ixo:introBlock",
            "html": "<h3>Welcome</h3><p>This is a claim form — each component configured per use case. Information is submitted and digitally signed by the submitter, making each claim immutable and verifiable. Data is stored in a secure, end-to-end encrypted vault accessible only to authorised accounts, then routed to an oracle for verification before triggering payments, credentials, or asset updates.\n\n</p>"
          }
        ]
      },
      {
        "name": "page-text-inputs",
        "elements": [
          {
            "type": "panel",
            "name": "schema:Person",
            "elements": [
              {
                "type": "text",
                "name": "schema:givenName",
                "title": "What is your first name?",
                "isRequired": true
              },
              {
                "type": "text",
                "name": "schema:email",
                "title": "What is your email address?",
                "description": "For example: jane@example.com",
                "validators": [
                  {
                    "type": "email",
                    "text": "Please enter an email so we can reply."
                  }
                ],
                "inputType": "email",
                "placeholder": "e.g. jane@example.com"
              },
              {
                "type": "text",
                "name": "schema:telephone",
                "title": "What is your phone number?",
                "inputType": "tel",
                "placeholder": "e.g. 082 123 4567"
              },
              {
                "type": "text",
                "name": "ixo:impactVolume",
                "title": "How many young people did you reach this month?",
                "inputType": "number",
                "min": 0,
                "max": 100000
              },
              {
                "type": "text",
                "name": "schema:url",
                "title": "Do you have a website? (optional)",
                "inputType": "url",
                "placeholder": "e.g. https://yoma.world"
              },
              {
                "type": "text",
                "name": "schema:startDate",
                "title": "When did your project start?",
                "inputType": "date"
              },
              {
                "type": "comment",
                "name": "schema:description",
                "title": "Tell us a little about your work.",
                "description": "A few sentences is fine.",
                "rows": 3
              }
            ],
            "title": "About you"
          }
        ],
        "title": "Text and number inputs"
      },
      {
        "name": "page-choice",
        "elements": [
          {
            "type": "radiogroup",
            "name": "ixo:serviceType",
            "title": "Which kind of opportunity do you offer?",
            "description": "Pick the one that fits best.",
            "choices": [
              {
                "value": "learning",
                "text": "Learning or a course"
              },
              {
                "value": "task",
                "text": "A task or gig"
              },
              {
                "value": "volunteering",
                "text": "Volunteering"
              },
              {
                "value": "job",
                "text": "A job placement"
              }
            ],
            "showOtherItem": true,
            "otherText": "Something else (please describe)"
          },
          {
            "type": "checkbox",
            "name": "ixo:sdgGoal",
            "title": "Which goals does your work support?",
            "description": "You can choose more than one.",
            "choices": [
              {
                "value": "1",
                "text": "No Poverty"
              },
              {
                "value": "4",
                "text": "Quality Education"
              },
              {
                "value": "8",
                "text": "Decent Work"
              },
              {
                "value": "13",
                "text": "Climate Action"
              }
            ],
            "showNoneItem": true,
            "noneText": "None of these"
          },
          {
            "type": "dropdown",
            "name": "schema:addressCountry",
            "title": "Which country are you in?",
            "choices": [
              {
                "value": "ZA",
                "text": "South Africa"
              },
              {
                "value": "KE",
                "text": "Kenya"
              },
              {
                "value": "NG",
                "text": "Nigeria"
              },
              {
                "value": "UG",
                "text": "Uganda"
              },
              {
                "value": "RW",
                "text": "Rwanda"
              },
              {
                "value": "GH",
                "text": "Ghana"
              }
            ]
          },
          {
            "type": "tagbox",
            "name": "schema:knowsLanguage",
            "title": "Which languages do you work in?",
            "description": "Choose all that apply.",
            "choices": [
              {
                "value": "en",
                "text": "English"
              },
              {
                "value": "zu",
                "text": "isiZulu"
              },
              {
                "value": "xh",
                "text": "isiXhosa"
              },
              {
                "value": "af",
                "text": "Afrikaans"
              },
              {
                "value": "sw",
                "text": "Swahili"
              },
              {
                "value": "fr",
                "text": "French"
              }
            ]
          },
          {
            "type": "boolean",
            "name": "ixo:verificationConsent",
            "title": "Can we verify your claims with a partner?",
            "labelTrue": "Yes",
            "labelFalse": "No"
          }
        ],
        "title": "Choosing answers"
      },
      {
        "name": "page-scales",
        "elements": [
          {
            "type": "rating",
            "name": "ixo:satisfactionScore",
            "title": "How happy are you with the Yoma platform?",
            "rateType": "smileys",
            "minRateDescription": "Not happy",
            "maxRateDescription": "Very happy"
          },
          {
            "type": "rating",
            "name": "ixo:recommendScore",
            "title": "How likely are you to recommend Yoma to a friend?",
            "rateCount": 11,
            "rateMin": 0,
            "rateMax": 10,
            "minRateDescription": "Not likely",
            "maxRateDescription": "Very likely"
          },
          {
            "type": "ranking",
            "name": "ixo:priorityRanking",
            "title": "Put these in order, from most to least important to you.",
            "description": "Drag the most important to the top.",
            "choices": [
              {
                "value": "income",
                "text": "Earning income"
              },
              {
                "value": "skills",
                "text": "Learning new skills"
              },
              {
                "value": "network",
                "text": "Meeting people"
              },
              {
                "value": "impact",
                "text": "Helping my community"
              }
            ]
          }
        ],
        "title": "Scales and ratings"
      },
      {
        "name": "page-matrix",
        "elements": [
          {
            "type": "matrix",
            "name": "ixo:agreementMatrix",
            "title": "How much do you agree with each statement?",
            "alternateRows": true,
            "columns": [
              {
                "value": "agree",
                "text": "Agree"
              },
              {
                "value": "unsure",
                "text": "Not sure"
              },
              {
                "value": "disagree",
                "text": "Disagree"
              }
            ],
            "rows": [
              {
                "value": "easy",
                "text": "Yoma is easy to use."
              },
              {
                "value": "useful",
                "text": "Yoma helped me find opportunities."
              },
              {
                "value": "trust",
                "text": "I trust how Yoma records my achievements."
              }
            ]
          },
          {
            "type": "matrixdropdown",
            "name": "ixo:opportunityMatrix",
            "title": "Tell us about two recent opportunities.",
            "columns": [
              {
                "name": "schema:name",
                "title": "Name",
                "cellType": "text"
              },
              {
                "name": "ixo:impactVolume",
                "title": "People reached",
                "cellType": "text",
                "inputType": "number"
              },
              {
                "name": "ixo:status",
                "title": "Status",
                "cellType": "dropdown",
                "choices": [
                  {
                    "value": "open",
                    "text": "Open"
                  },
                  {
                    "value": "closed",
                    "text": "Closed"
                  }
                ]
              }
            ],
            "rows": [
              {
                "value": "row1",
                "text": "First"
              },
              {
                "value": "row2",
                "text": "Second"
              }
            ]
          },
          {
            "type": "matrixdynamic",
            "name": "ixo:teamMembers",
            "title": "List the people on your team.",
            "description": "Add a row for each person.",
            "columns": [
              {
                "name": "schema:givenName",
                "title": "Name",
                "cellType": "text"
              },
              {
                "name": "schema:roleName",
                "title": "Role",
                "cellType": "dropdown",
                "choices": [
                  {
                    "value": "lead",
                    "text": "Lead"
                  },
                  {
                    "value": "mentor",
                    "text": "Mentor"
                  },
                  {
                    "value": "support",
                    "text": "Support"
                  }
                ]
              }
            ],
            "rowCount": 1,
            "addRowText": "Add a person"
          }
        ],
        "title": "Grids"
      },
      {
        "name": "page-rich",
        "elements": [
          {
            "type": "imagepicker",
            "name": "ixo:focusArea",
            "title": "Which focus area best matches your work?",
            "description": "Tap a picture to choose.",
            "choices": [
              {
                "value": "energy",
                "text": "Clean energy",
                "imageLink": "https://images.unsplash.com/photo-1509391366360-2e959784a276?w=300&q=60"
              },
              {
                "value": "education",
                "text": "Education",
                "imageLink": "https://images.unsplash.com/photo-1503676260728-1c00da094a0b?w=300&q=60"
              },
              {
                "value": "agriculture",
                "text": "Agriculture",
                "imageLink": "https://images.unsplash.com/photo-1500382017468-9049fed747ef?w=300&q=60"
              }
            ],
            "showLabel": true
          },
          {
            "type": "file",
            "name": "ixo:evidenceFile",
            "title": "Upload a photo as proof (optional).",
            "description": "A clear photo, smaller than 5 megabytes. Note: in the free demo tool, the whole form is capped at 64 KB.",
            "acceptedTypes": "image/*",
            "storeDataAsText": false,
            "maxSize": 5242880
          },
          {
            "type": "paneldynamic",
            "name": "ixo:beneficiaryRecords",
            "title": "Add the young people you supported.",
            "description": "Use 'Add another' for each person.",
            "templateElements": [
              {
                "type": "text",
                "name": "ixo:beneficiaryId",
                "title": "Reference (no real names)",
                "placeholder": "e.g. YP-001"
              },
              {
                "type": "text",
                "name": "schema:birthDate",
                "title": "Year of birth",
                "inputType": "number",
                "min": 1950,
                "max": 2020
              }
            ],
            "panelCount": 1,
            "addPanelText": "Add another person"
          },
          {
            "type": "signaturepad",
            "name": "ixo:agentSignature",
            "title": "Please sign to confirm this is true.",
            "description": "Use your finger or mouse to sign in the box."
          }
        ],
        "title": "Pictures, files and signing"
      },
      {
        "name": "page-logic",
        "elements": [
          {
            "type": "radiogroup",
            "name": "ixo:hasFunding",
            "title": "Do you receive funding for this work?",
            "choices": [
              {
                "value": "yes",
                "text": "Yes"
              },
              {
                "value": "no",
                "text": "No"
              }
            ]
          },
          {
            "type": "text",
            "name": "schema:funding",
            "visibleIf": "{ixo:hasFunding} = 'yes'",
            "title": "Who funds your work?",
            "description": "This question only appears because you answered 'Yes' above."
          },
          {
            "type": "expression",
            "name": "ixo:reachSummary",
            "title": "Your reported reach this month",
            "description": "This value is calculated automatically from an earlier answer.",
            "expression": "{ixo:impactVolume}"
          }
        ],
        "title": "Smart questions"
      },
      {
        "name": "page1",
        "elements": [
          {
            "type": "map-grid-selector",
            "name": "question2",
            "title": "This is a location component",
            "description": "Allow users to mark a location:\n- adjust the grid size\n- view current location\n- enable multi-block select\n- set default location\n- switch between map and satellite views",
            "center": "-26.197636603718593, 28.042161385816932"
          }
        ],
        "title": "Location "
      },
      {
        "name": "page-close",
        "elements": [
          {
            "type": "html",
            "name": "ixo:closingBlock",
            "html": "<h3>Thank you</h3><p>You have seen text inputs, single and multiple choice, dropdowns, tag boxes, switches, ratings, ranking, grids, repeating panels, image pickers, file upload, a signature pad, conditional logic and a calculated field &mdash; all standard SurveyJS blocks.</p><p>Press <strong>Finish</strong> to complete the demo.</p>"
          },
          {
            "type": "boolean",
            "name": "ixo:demoConsent",
            "title": "I understand this was a demonstration.",
            "labelTrue": "Yes",
            "labelFalse": "No"
          }
        ],
        "title": "Almost done"
      }
    ],
    "showQuestionNumbers": "on",
    "questionErrorLocation": "bottom",
    "showProgressBar": true,
    "progressBarLocation": "top",
    "startSurveyText": "Start the demo",
    "pagePrevText": "Back",
    "pageNextText": "Next",
    "completeText": "Finish",
    "firstPageIsStartPage": true
  }
}