details:
    type: studentApplicationForm
    name: Student Application Form
    desc: Application form details.
    category: Admissions
    table: gibbonApplicationForm
    modes: { update: true, insert: true, export: true }
access:
    module: Students
    action: Manage Applications
primaryKey:
    gibbonApplicationFormID
table:
    gibbonSchoolYearIDEntry:
        name: "School Year of Entry"
        desc: "Must match an existing school year e.g. 2015-2016"
        args: { filter: schoolyear, required: true, custom: true }
        relationship: { table: gibbonSchoolYear, key: gibbonSchoolYearID, field: name }
    gibbonYearGroupIDEntry:
        name: "Year Group at Entry"
        desc: "Year group short name, as set in School Admin. Must already exist."
        args: { filter: string, required: true }
        relationship: { table: gibbonYearGroup, key: gibbonYearGroupID, field: nameShort }
    gibbonSchoolYearID:
        name: "School Year"
        desc: "Linked field for internal use"
        args: { filter: schoolyear, linked: gibbonSchoolYearIDEntry, readonly: true }
    gibbonFormGroupID:
        name: "Form Group"
        desc: "Form Group short name, as set in School Admin. Must already exist."
        args: { filter: string }
        relationship: { table: gibbonFormGroup, key: gibbonFormGroupID, field: [ nameShort, gibbonSchoolYearID] }
    dateStart:
        name: "Start Date"
        desc: "Users's first day at school."
        args: {filter: date}
    surname:
        name: "Surname"
        desc: "Family Name"
        args: {filter: string, required: true}
    firstName:
        name: "First Name"
        desc: "Given name"
        args: {filter: string, required: true}
    preferredName:
        name: "Preferred Name"
        desc: "Most common name, alias, nickname, handle, etc"
        args: {filter: string, required: true}
    officialName:
        name: "Official Name"
        desc: "Full name as shown in ID documents."
        args: {filter: string, required: true}
    nameInCharacters:
        name: "Name in Characters"
        desc: "Chinese or other character-based name."
        args: {filter: string}
    gender:
        name: "Gender"
        desc: ""
        args: {filter: gender, required: true}
    dob:
        name: "Date of Birth"
        desc: "yyyy-mm-dd"
        args: {filter: date}
    email:
        name: "Student Email"
        desc: ""
        args: {filter: email}
    homeAddress:
        name: "Home Address"
        desc: "Unit, Building, Street"
        args: {filter: string}
    homeAddressDistrict:
        name: "Home Address (District)"
        desc: "County, State, District"
        args: {filter: string}
    homeAddressCountry:
        name: "Home Address (Country)"
        desc: ""
        args: {filter: country }
    languageHomePrimary: 
        name: "Home Language (Primary)"
        desc: ""
        args: { filter: language }
    countryOfBirth:
        name: "Country of Birth"
        desc: ""
        args: {filter: country, custom: true}
    sen:
        name: "Special Education Needs"
        desc: ""
        args: {filter: yesNo, custom: true}
    languageFirst:
        name: "First Language"
        desc: ""
        args: {filter: language }
    languageSecond:
        name: "Second Language"
        desc: ""
        args: {filter: language }

    parent1title:
        name: "Parent 1 Title"
        desc: ""
        args: {filter: string, required: true, custom: true}
    parent1surname:
        name: "Parent 1 Surname"
        desc: ""
        args: {filter: string, required: true, custom: true}
    parent1firstName:
        name: "Parent 1 First Name"
        desc: ""
        args: {filter: string, required: true, custom: true}
    parent1preferredName:
        name: "Parent 1 Preferred Name"
        desc: ""
        args: {filter: string, required: true, custom: true}
    parent1officialName:
        name: "Parent 1 Official Name"
        desc: "Full name as shown in ID documents."
        args: {filter: string, required: true}
    parent1gender:
        name: "Parent 1 Gender"
        desc: ""
        args: {filter: gender, required: true, custom: true}
    parent1phone1Type:
        name: "Parent 1 Phone 1 (Type)"
        desc: "Mobile, Home, Work, Fax, Pager, Other"
        args: {filter: phonetype, custom: true}
    parent1phone1CountryCode:
        name: "Parent 1 Phone 1 (Country Code)"
        desc: "IDD code, without 00 or +"
        args: {filter: phonecode, custom: true}
    parent1phone1:
        name: "Parent 1 Phone 1"
        desc: ""
        args: {filter: string }
    parent1phone2Type:
        name: "Parent 1 Phone 2 (Type)"
        desc: "Mobile, Home, Work, Fax, Pager, Other"
        args: {filter: phonetype, custom: true}
    parent1phone2CountryCode:
        name: "Parent 1 Phone 2 (Country Code)"
        desc: "IDD code, without 00 or +"
        args: {filter: phonecode, custom: true}
    parent1phone2:
        name: "Parent 1 Phone 2"
        desc: ""
        args: {filter: string }
    parent1email:
        name: "Parent 1 Email"
        desc: ""
        args: {filter: email}
    parent1relationship:
        name: "Parent 1 Relationship"
        desc: ""
        args: {filter: string, custom: true }
    parent1profession:
        name: "Parent 1 Profession"
        desc: "For parents only"
        args: {filter: string}

    parent2title:
        name: "Parent 2 Title"
        desc: ""
        args: {filter: string, required: true, custom: true}
    parent2surname:
        name: "Parent 2 Surname"
        desc: ""
        args: {filter: string, required: true, custom: true}
    parent2firstName:
        name: "Parent 2 First Name"
        desc: ""
        args: {filter: string, required: true, custom: true}
    parent2preferredName:
        name: "Parent 2 Preferred Name"
        desc: ""
        args: {filter: string, required: true, custom: true}
    parent2officialName:
        name: "Parent 2 Official Name"
        desc: "Full name as shown in ID documents."
        args: {filter: string, required: true}
    parent2gender:
        name: "Parent 2 Gender"
        desc: ""
        args: {filter: gender, required: true, custom: true}
    parent2phone1Type:
        name: "Parent 2 Phone 1 (Type)"
        desc: "Mobile, Home, Work, Fax, Pager, Other"
        args: {filter: phonetype, custom: true}
    parent2phone1CountryCode:
        name: "Parent 2 Phone 1 (Country Code)"
        desc: "IDD code, without 00 or +"
        args: {filter: phonecode, custom: true}
    parent2phone1:
        name: "Parent 2 Phone 1"
        desc: ""
        args: {filter: string }
    parent2phone2Type:
        name: "Parent 2 Phone 2 (Type)"
        desc: "Mobile, Home, Work, Fax, Pager, Other"
        args: {filter: phonetype, custom: true}
    parent2phone2CountryCode:
        name: "Parent 2 Phone 2 (Country Code)"
        desc: "IDD code, without 00 or +"
        args: {filter: phonecode, custom: true}
    parent2phone2:
        name: "Parent 2 Phone 2"
        desc: ""
        args: {filter: string }
    parent2email:
        name: "Parent 2 Email"
        desc: ""
        args: {filter: email}
    parent2relationship:
        name: "Parent 2 Relationship"
        desc: ""
        args: {filter: string, custom: true }
    parent2profession:
        name: "Parent 2 Profession"
        desc: "For parents only"
        args: {filter: string}

    dayType:
        name: "Student ID"
        desc: "(dayType)"
        args: {filter: string}
    paymentMade :
        name: "Payment Made"
        desc: "Yes/No"
        args: {filter: string}
    medicalInformation:
        name: "Medical Information"
        desc: ""
        args: {filter: string}
    privacy:
        name: "Privacy Options"
        desc: ""
        args: {filter: string}
    notes:
        name: "Notes"
        desc: ""
        args: {filter: string}
    howDidYouHear:
        name: "How Did You Hear"
        desc: ""
        args: {filter: string, custom: true}
    howDidYouHearMore:
        name: "How Did You Hear (text)"
        desc: ""
        args: {filter: string, custom: true}
    milestones:
        name: "Milestones"
        desc: ""
        args: {filter: string, custom: true}
