{
  "@context": {
    "ixo": "https://w3id.org/ixo/ns/protocol/",
    "@id": "@type",
    "type": "@type",
    "@protected": true
  },
  "type": "ixo:entity#surveyTemplate",
  "question": {
    "title": "Lead Screening",
    "description": "Please provide the customer's details. A red star * means you must answer.",
    "pages": [
      {
        "name": "page1",
        "elements": [
          {
            "type": "text",
            "name": "schema:name",
            "title": "What is the customer's full name?",
            "description": "Enter the customer's first and last name.",
            "isRequired": true
          },
          {
            "type": "text",
            "name": "schema:identifier",
            "title": "What is the customer's NRC number?",
            "description": "Enter the NRC number in this format: XXXXXX/XX/X.",
            "isRequired": true,
            "validators": [
              {
                "type": "regex",
                "text": "Please enter a valid NRC in the format XXXXXX/XX/X.",
                "regex": "^[0-9]{6}/[0-9]{2}/[0-9]$"
              }
            ]
          },
          {
            "type": "text",
            "name": "schema:address",
            "title": "Where does the customer live?",
            "description": "Enter the customer's street address.",
            "isRequired": true
          },
          {
            "type": "text",
            "name": "custom:monthlyCharcoalSpending",
            "title": "How much does the customer spend on charcoal each month?",
            "description": "Enter the amount the customer spends on charcoal each month.",
            "isRequired": true,
            "validators": [
              {
                "type": "numeric",
                "text": "Please enter a valid amount of 0 or more.",
                "minValue": 0
              }
            ],
            "inputType": "number"
          },
          {
            "type": "text",
            "name": "schema:numberOfPeople",
            "title": "How many people live in the customer's home?",
            "description": "Enter the total number of people who live in the home.",
            "isRequired": true,
            "validators": [
              {
                "type": "numeric",
                "text": "Please enter at least 1 person.",
                "minValue": 1
              }
            ],
            "inputType": "number"
          }
        ],
        "title": "Customer Details"
      }
    ],
    "showQuestionNumbers": "on",
    "questionErrorLocation": "bottom",
    "showProgressBar": true,
    "progressBarLocation": "top",
    "pagePrevText": "Back",
    "pageNextText": "Next",
    "completeText": "Submit",
    "headerView": "advanced"
  }
}