{
  "@context": {
    "ixo": "https://w3id.org/ixo/ns/protocol/",
    "@id": "@type",
    "type": "@type",
    "@protected": true
  },
  "type": "ixo:entity#surveyTemplate",
  "question": {
    "title": "SupaMoto Delivery Agent Registration",
    "pages": [
      {
        "name": "registration",
        "elements": [
          {
            "type": "text",
            "name": "schema:givenName",
            "title": "Name",
            "isRequired": true
          },
          {
            "type": "text",
            "name": "schema:familyName",
            "title": "Surname",
            "isRequired": true
          },
          {
            "type": "text",
            "name": "schema:email",
            "title": "Email",
            "validators": [
              {
                "type": "email",
                "text": "Please enter a valid email address."
              }
            ],
            "inputType": "email"
          },
          {
            "type": "text",
            "name": "schema:telephone",
            "title": "Phone number",
            "isRequired": true,
            "validators": [
              {
                "type": "regex",
                "text": "Please enter the phone number in international format, including the country code (e.g. +260977123456).",
                "regex": "^\\+[1-9]\\d{6,14}$"
              }
            ],
            "inputType": "tel"
          },
          {
            "type": "text",
            "name": "person:nationalId",
            "title": "National Registration Number",
            "isRequired": true,
            "validators": [
              {
                "type": "regex",
                "text": "Use the format xxxxxx/xx/x",
                "regex": "^\\d{6}/\\d{2}/\\d{1}$"
              }
            ]
          }
        ],
        "title": "Agent Information"
      },
      {
        "name": "page1",
        "elements": [
          {
            "type": "map-grid-selector",
            "name": "ixo:geoLocation",
            "title": "Primary Operating Location",
            "description": "The primary location where activities are conducted/based from.\nThe map will default to your current location, zoom in until you see the grid on the map, select the cell that represents the primary location.",
            "isRequired": true,
            "center": "-15.408352478000213, 28.28021546503468"
          }
        ],
        "title": "Delivery Agent Details"
      },
      {
        "name": "reviewAndSubmit",
        "elements": [
          {
            "type": "html",
            "name": "reviewMessage",
            "html": "<h3>Thank you for completing the registration!</h3><p>Please review your answers below before submitting.</p>"
          }
        ],
        "title": "Thank You"
      }
    ],
    "checkErrorsMode": "onValueChanged",
    "validateVisitedEmptyFields": true,
    "textUpdateMode": "onTyping",
    "showPreviewBeforeComplete": true
  }
}
