{
  "@context": {
    "ixo": "https://w3id.org/ixo/ns/protocol/",
    "@id": "@type",
    "type": "@type",
    "@protected": true
  },
  "type": "ixo:entity#surveyTemplate",
  "question": {
    "title": "SupaMoto Stove Repossession",
    "description": "Record a stove being collected back from a customer. The Customer ID, the stove serial number and the reason are required. Give a destination account address only if the stove is going somewhere other than the current user's own account.",
    "pages": [
      {
        "name": "repossession",
        "elements": [
          {
            "type": "text",
            "name": "ecs:customerId",
            "title": "Customer ID",
            "description": "The SupaMoto Customer ID (e.g. C21009802).",
            "isRequired": true
          },
          {
            "type": "text",
            "name": "ecs:stoveSerialNumber",
            "title": "Stove serial number",
            "description": "The long number on the sticker under the stove.",
            "isRequired": true
          },
          {
            "type": "dropdown",
            "name": "ecs:repossessionReason",
            "title": "Reason",
            "description": "Why is this stove being collected? Choose Other to type a different reason.",
            "choices": [
              "Repossession",
              "Correction",
              "Replacement"
            ],
            "showOtherItem": true,
            "isRequired": true
          },
          {
            "type": "text",
            "name": "ecs:destinationDid",
            "title": "Destination account address",
            "description": "Optional. The account address (DID) the stove is being sent to. Leave this blank to use the current user's own account address.",
            "validators": [
              {
                "type": "regex",
                "regex": "^did:ixo:[A-Za-z0-9:._-]+$",
                "text": "Enter a full DID, starting with did:ixo:"
              }
            ]
          }
        ],
        "title": "Repossession Details"
      },
      {
        "name": "reviewAndSubmit",
        "elements": [
          {
            "type": "html",
            "name": "reviewMessage",
            "html": "<h3>Thank you for completing this repossession record!</h3><p>Please review your answers below before submitting.</p>"
          }
        ],
        "title": "Thank You"
      }
    ],
    "checkErrorsMode": "onValueChanged",
    "validateVisitedEmptyFields": true,
    "textUpdateMode": "onTyping",
    "showPreviewBeforeComplete": true
  }
}
