/*
 * Author       : pageantcast
 * Generated on : 22-Nov-2009 21:14:36
 * Version      : 3.0
 */
application "E-Mail us!"
{
    type = public
    date format = "dd-MMM-yyyy"
    time zone = "America/Chicago"
    section Home
    {
        form  Main_Form
        {
            displayname  =  "E-mail Us!"
            success message  =  "Thank you for your e-mail!"
            
            Your_Email_Address
            (
                displayname  =  "Your Email Address"
                type  =  email
            )

            must  have  Feedback_Category
            (
                displayname  =  "Feedback Category"
                type  =  picklist
                values  =  {"Podcast Suggestion",   "Comment",   "Website Suggestion",   "Correction",   "Upload photo/press release"}
                sortorder  =  ascending
            )

            Comments
            (
                type  =  textarea
            )

            File_upload_1
            (
                displayname  =  "To upload picture, use this..."
                type = upload file
            )

            actions
            {
                on add
                {
                    Submit
                    (
                        type  =  submit
                        displayname  =  "Submit"
                        on success
                        {
                            sendmail
                            (
                                To       :  "pageantcast@gmail.com" 
                                From     :  zoho.adminuserid 
                                Subject  :  "Received an e-mail from the form" 
                                Message  :  input.formdata 
                            )
                        }
                    )
                    Reset
                    (
                        type  =  reset
                        displayname  =  "Reset"
                    )
                }
                on edit
                {
                    Update
                    (
                        type  =  submit
                        displayname  =  "Update"
                    )
                    Cancel
                    (
                        type  =  cancel
                        displayname  =  "Cancel"
                    )
                }
            }
        }

        list  Main_Form_View
        {
            displayname = "Main Form View"
            show  all  rows  from  Main_Form 
            (
                ID
                Added_User as "Added User"
                Added_Time as "Added Time"
                Modified_User as "Last Modified User"
                Modified_Time as "Last Modified Time"
                Your_Email_Address as "Your Email Address"
                Feedback_Category as "Feedback Category"
                Comments
                File_upload_1 as "File upload 1"
            )
            options
            (
                display rows = 100
            )
        }

    }

}
