/*
 * Author       : daruna
 * Generated on : 22-Nov-2009 23:17:26
 * Version      : 3.0
 */
application "Personal Information"
{
    type = public
    date format = "dd-MMM-yy"
    time zone = "Asia/Manila"
    section Home
    {
        form  form
        {
            displayname  =  "Personal Information"
            captcha = true
            success message  =  "Data Added Successfully at Daruna Commercial Database!"
            
            must  have  unique  Student_Number
            (
                displayname  =  "Student Number"
                type  =  number
                width  =  20
                tooltip  =  "Write your student number"
            )

            must  have  unique  Surname
            (
                type  =  text
            )

            must  have  unique  First_name
            (
                displayname  =  "Firstname"
                type  =  text
            )

            must  have  unique  Birthdate
            (
                type  =  datetime
            )

            must  have  unique  Address
            (
                displayname  =  "Birthplace"
                type  =  text
                maxchar  =  99
            )

            must  have  unique  Telephone_Mobile_Number
            (
                displayname  =  "Phone Number"
                type  =  number
                width  =  20
            )

            must  have  unique  Email
            (
                type  =  email
            )

            must  have  Multi_Line_1
            (
                displayname  =  "Address"
                type  =  textarea
            )

            must  have  unique  Amphoe
            (
                displayname  =  "District"
                type  =  text
            )

            must  have  Province
            (
                type  =  picklist
                values  =  {"Ratchaburi",   "Uttaradit",   "Phrae",   "Phayao",   "Nan",   "Mae Hong Son",   "Lamphun",   "Chiang Rai",   "Lampang",   "Chiang Mai",   "Kanchanaburi",   "Tak",   "Phetchaburi",   "Chai Nat",   "Kamphaeng Phet",   "Uthai Thani",   "Suphan Buri",   "Sing Buri",   "Saraburi",   "Samut Songkram",   "Samut Sakhon",   "Samut Prakan",   "Sukhothai",   "Phitsanulok",   "Phichit",   "Petchabun",   "Pthum Thani",   "Yasothon",   "Chachoengsao",   "Yala",   "Trang",   "Surat Thani",   "Songkhla",   "Satun",   "Ranong",   "Phuket",   "Phatthalung",   "Phang Nga",   "Pattani",   "Narathiwat",   "Nakhon Si Thammarat",   "Krabi",   "Chumphon",   "Trat",   "Sa Kaeo",   "Rayong",   "Prachin Buri",   "Chon Buri",   "Chanthaburi",   "Udon Thani",   "Ubon Ratchathani",   "Surin",   "Si Sa Ket",   "Sakon Nakhon",   "Roi Et",   "Nong Khai",   "Nong Bua Lamphu",   "Nakhon Ratchasima",   "Nakhon Phanom",   "Mukdahan",   "Maha Sarakham",   "Loei",   "Khon Kaen",   "Kalasin",   "Chaiyaphum",   "Buri Ram",   "Amnat Charoen",   "Nonthaburi"}
                sortorder  =  ascending
            )

            must  have  Religion
            (
                type  =  picklist
                values  =  {"Roman Catholic",   "Buddhist",   "Muslim",   "Adventist",   "Protestant",   "Christian"}
                sortorder  =  ascending
            )

            must  have  Marital_Status
            (
                displayname  =  "Marital Status"
                type  =  picklist
                values  =  {"Single",   "Married",   "Widowed",   "Annuled/Divorced/Separated"}
                sortorder  =  ascending
            )

            must  have  Hobbies_Interests
            (
                displayname  =  "Interests"
                type  =  textarea
            )

            must  have  Skills
            (
                type  =  textarea
            )

            must  have  unique  Ambition
            (
                type  =  text
                tooltip  =  "If you have your career right now, what would be the alternative?"
            )

            actions
            {
                on add
                {
                    Submit
                    (
                        type  =  submit
                        displayname  =  "Submit"
                    )
                    Reset
                    (
                        type  =  reset
                        displayname  =  "Reset"
                    )
                }
                on edit
                {
                    Update
                    (
                        type  =  submit
                        displayname  =  "Update"
                    )
                    Cancel
                    (
                        type  =  cancel
                        displayname  =  "Cancel"
                    )
                }
            }
        }

        list  "View"
        {
            displayname = "1 View"
            show  all  rows  from  form 
            (
                Surname
                First_name as "First name"
                Address
                Multi_Line_1 as "Multi Line 1"
                Amphoe
                Province
                Birthdate
                Hobbies_Interests as "Hobbies/Interests"
                Skills
                Ambition
                Religion
                Marital_Status as "Marital Status"
                Student_Number as "Student Number"
                Telephone_Mobile_Number as "Telephone/Mobile Number"
                Email
            )
            filters 
            (
                Province
                Religion
                Marital_Status
            )
            options
            (
                display rows = 100
            )
        }

    }

}
