{
  "title": "SupaMoto Lead Creation",
  "pages": [
    {
      "name": "screening",
      "elements": [
        {
          "type": "text",
          "name": "ecs:customerId",
          "title": "Customer ID",
          "readOnly": true
        },
        {
          "type": "text",
          "name": "person:nationalId",
          "title": "National Registration Number",
          "validators": [
            {
              "type": "regex",
              "text": "Use the format xxxxxx/xx/x",
              "regex": "^\\d{6}/\\d{2}/\\d{1}$"
            }
          ],
          "placeholder": "xxxxxx/xx/x"
        },
        {
          "type": "dropdown",
          "name": "ecs:leadGenerator",
          "title": "Lead Source",
          "choices": [
            "Call Center",
            "Lead Generator ",
            "Reseller Shop",
            "USSD Signup"
          ],
          "showOtherItem": true
        },
        {
          "type": "dropdown",
          "name": "schema:name_leadGenerator",
          "visibleIf": "{ecs:leadGenerator} = 'Lead Generator '",
          "title": "Lead Generator Name",
          "choices": [
            "Aggie Mumbi  ",
            "Alister Kandyata  ",
            "Artness Phiri",
            "Asaile Hangenimana  ",
            "Astridah Namambilo",
            "Beatrice Mwewa",
            "Beauty Sefwa",
            "Beenzu Matongo",
            "Brendah Ngobola",
            "Bridget Selina Kaluba",
            "Catherine Mwanjelwa",
            "Charity Mwimwi",
            "Collins Mutina",
            "Deborah Chinyika   ",
            "Dorica Bwale",
            "Emeldah Gondwe",
            "Enock Chibatabata",
            "Felistus Mwiche Chishimba",
            "Fridah Chikamba  ",
            "Geoffrey Banda",
            "George Chungu   ",
            "Gloria Mako",
            "Grace Chiteta",
            "Inutu Mushaukwa",
            "Iredy Banda  15 Miles",
            "Iredy Banda  6 Miles",
            "Ireen Nakazwe",
            "Irene Simumba",
            "Joseph Kalima",
            "Jouas Siwila  ",
            "Joyce Banda  ",
            "Judith Kambembe",
            "Judith Mwila",
            "Lazarus Phiri  ",
            "Leah Mwelwa",
            "Lillian Mwale",
            "Linda Chilulwe",
            "Loveness Tembo",
            "Lweendo Mumba",
            "Mary Nanyinza",
            "Mary Sombe",
            "Mathias Mwepu",
            "Maybin Musaka  ",
            "Misozi Tembo",
            "Modesta Mulela  ",
            "Morris Kapalala",
            "Mutesi Ngenzo",
            "Nachalwe Irene Suwilanji",
            "Noah Sakulanda",
            "Patricia Mulenga",
            "Paul Katongo",
            "Penelope Namutanda",
            "Rosemary Kasonde",
            "Rosemary musachi",
            "Ruth Sekani Ciumia",
            "Samuel Kapindo",
            "Selina Nanyangwe  ",
            "Simeon Chisupa  ",
            "Susan Mwanza",
            "Valentine Chisha",
            "Violet Kayombo",
            "Vivian Mwewa",
            "World Food Program",
            "Yvonne Nachilima"
          ]
        },
        {
          "type": "text",
          "name": "schema:givenName",
          "title": "First Name",
          "validators": [
            {
              "type": "regex",
              "regex": "^[A-Za-z ]+$"
            }
          ]
        },
        {
          "type": "text",
          "name": "schema:familyName",
          "title": "Last Name",
          "validators": [
            {
              "type": "regex",
              "regex": "^[A-Za-z ]+$"
            }
          ]
        },
        {
          "type": "text",
          "name": "schema:telephone",
          "title": "Contact number",
          "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"
        }
      ],
      "title": "Questions"
    }
  ],
  "triggers": [
    {
      "type": "skip",
      "expression": "({totalPortions} < 8)",
      "gotoName": "reviewMessage"
    }
  ],
  "calculatedValues": [
    {
      "name": "totalPortions",
      "expression": "sum({ecs:quantityBreakfast}, {ecs:quantityLunch},{ecs:quantityDinner})",
      "includeIntoResult": true
    }
  ],
  "checkErrorsMode": "onValueChanged",
  "validateVisitedEmptyFields": true,
  "textUpdateMode": "onTyping",
  "showPreviewBeforeComplete": true
}