{
  "@context": {
    "ixo": "https://w3id.org/ixo/ns/protocol/",
    "@id": "@type",
    "type": "@type",
    "@protected": true
  },
  "type": "ixo:entity#surveyTemplate",
  "question": {
    "title": "SupaMoto Stove On‑Boarding",
    "pages": [
      {
        "name": "demonstration",
        "title": "1 · Demonstration of the Stove",
        "elements": [
          {
            "type": "text",
            "name": "ecs:customerId",
            "title": "Customer ID",
            "isRequired": true
          },
          {
            "type": "radiogroup",
            "name": "ecs:ownsStove",
            "title": "Do you already have a stove from SupaMoto in your household?",
            "choices": [
              "Yes",
              "No"
            ]
          },
          {
            "type": "text",
            "name": "schema:fullName",
            "visibleIf": "{ecs:ownsStove} = 'Yes'",
            "title": "Who has the contract for the stove?",
            "description": "Name Surname"
          },
          {
            "type": "text",
            "name": "ecs:customerId_existing",
            "visibleIf": "{ecs:ownsStove} = 'Yes'",
            "title": "What is their SupaMoto Customer ID?"
          },
          {
            "type": "text",
            "name": "person:nationalId_1",
            "visibleIf": "{ecs:ownsStove} = 'Yes'",
            "title": "What is their National Identity Number?",
            "validators": [
              {
                "type": "regex",
                "text": "Use the format xxxxxx/xx/x",
                "regex": "^\\d{6}/\\d{2}/\\d{1}$"
              }
            ]
          },
          {
            "type": "html",
            "name": "demoIntro",
            "html": "<p>The field officer now demonstrates safe operation, lighting and refuelling of the Supamoto stove.</p>"
          }
        ]
      },
      {
        "name": "contractExplanation",
        "title": "2 · Contract Explanation",
        "elements": [
          {
            "type": "html",
            "name": "contractIntro",
            "html": "<p>Please read or listen carefully to the contract terms that govern stove ownership, carbon‑data waiver and repayment obligations.</p>"
          }
        ]
      },
      {
        "name": "signContract",
        "title": "3 · Sign Contract",
        "elements": [
          {
            "type": "file",
            "name": "schema:signedContract",
            "title": "Upload photo of the signed contract (all pages)",
            "isRequired": true,
            "allowMultiple": true,
            "acceptedTypes": "image/jpeg, image/png",
            "waitForUpload": true,
            "maxSize": 10000000,
            "sourceType": "file-camera"
          },
          {
            "type": "text",
            "name": "schema:signedContractDate",
            "title": "Date of signature (Contract)",
            "isRequired": true,
            "inputType": "date"
          }
        ]
      },
      {
        "name": "customerData",
        "title": "5 · Customer Details & Documentation",
        "elements": [
          {
            "type": "text",
            "name": "schema:birthDate",
            "title": "Date of Birth",
            "isRequired": true,
            "inputType": "date",
            "placeholder": "XXXX/XX/XX"
          },
          {
            "type": "radiogroup",
            "name": "person:gender",
            "title": "Gender",
            "choices": [
              {
                "value": "male",
                "text": "Male"
              },
              {
                "value": "female",
                "text": "Female"
              }
            ]
          },
          {
            "type": "radiogroup",
            "name": "ecs:marital_status",
            "title": "Marital Status",
            "isRequired": true,
            "choices": [
              {
                "value": "single",
                "text": "Single"
              },
              {
                "value": "married",
                "text": "Married"
              },
              {
                "value": "divorced",
                "text": "Divorced"
              },
              {
                "value": "widowed",
                "text": "Widowed"
              }
            ]
          },
          {
            "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}$"
              }
            ],
            "placeholder": "XXXXXX/XX/X"
          },
          {
            "type": "file",
            "name": "person:nationalIdCard",
            "title": "National Registration Card (front & back)",
            "isRequired": true,
            "allowMultiple": true,
            "acceptedTypes": "image/jpeg, image/png",
            "waitForUpload": true,
            "maxSize": 10000000,
            "sourceType": "file-camera"
          },
          {
            "type": "file",
            "name": "schema:dataWaiver",
            "title": "Signed Carbon/Data Waiver (all pages)",
            "isRequired": true,
            "allowMultiple": true,
            "acceptedTypes": "image/jpeg, image/png",
            "waitForUpload": true,
            "maxSize": 10000000,
            "sourceType": "file-camera"
          },
          {
            "type": "text",
            "name": "schema:dataWaiverDate",
            "title": "Date of signature (Carbon Waiver)",
            "isRequired": true,
            "inputType": "date"
          },
          {
            "type": "file",
            "name": "schema:profileImage",
            "title": "Profile Image ",
            "description": "Provide the reference the customer can use for real‑time payment assignment.",
            "isRequired": true,
            "acceptedTypes": "image/jpeg, image/png",
            "waitForUpload": true,
            "maxSize": 10000000,
            "sourceType": "file-camera"
          }
        ]
      }
    ],
    "checkErrorsMode": "onValueChanged",
    "validateVisitedEmptyFields": true,
    "textUpdateMode": "onTyping",
    "showPreviewBeforeComplete": true
  }
}