/*
 * Author       : laminucph
 * Generated on : 22-Nov-2009 21:11:42
 * Version      : 3.0
 */
application "Registration"
{
    type = public
    date format = "dd-MMM-yyyy"
    time zone = "Europe/Copenhagen"
    section Home
    {
        form  Registration_for_Laminu_cph
        {
            displayname  =  "Registration for Laminu-cph"
            
            must  have  Name
            (
                type  =  text
            )

            must  have  Email_Address
            (
                displayname  =  "Email Address"
                type  =  email
            )

            must  have  Gender
            (
                displayname  =  "Follower/Leader"
                type  =  radiobuttons
                values  =  {"Follower",   "Leader"}
            )

            must  have  Contact_Number
            (
                displayname  =  "Contact Number"
                type  =  text
            )

            must  have  Country
            (
                type  =  text
            )

            must  have  Address
            (
                type  =  textarea
            )

            Need_hosting
            (
                displayname  =  "Need hosting?"
                type  =  checkboxes
                values  =  {"Yes, I do"}
            )

            must  have  City
            (
                displayname  =  "Can you host people? How many?"
                type  =  text
                width  =  30
            )

            must  have  Any_comments_questions
            (
                displayname  =  "Any comments/questions?"
                type  =  textarea
            )

            actions
            {
                on add
                {
                    Submit
                    (
                        type  =  submit
                        displayname  =  "Submit"
                        on success
                        {
                            sendmail
                            (
                                To       :  ("laminu.cph@gmail.com") 
                                From     :  zoho.adminuserid 
                                Subject  :  ("Tilmelding Laminu-CPH") 
                                Message  :  input.formdata 
                            )
                        }
                    )
                    Reset
                    (
                        type  =  reset
                        displayname  =  "Reset"
                    )
                }
                on edit
                {
                    Update
                    (
                        type  =  submit
                        displayname  =  "Update"
                    )
                    Cancel
                    (
                        type  =  cancel
                        displayname  =  "Cancel"
                    )
                }
            }
        }

    }

}
