/*
 * Author       : veeravalli
 * Generated on : 22-Nov-2009 23:54:04
 * Version      : 3.0
 */
application "Contact form"
{
    type = public
    date format = "dd-MMM-yyyy"
    time zone = "America/Los_Angeles"
    section Home
    {
        form  Contact_me
        {
            displayname  =  "Contact me"
            
            plain
            (
                type  =  plaintext
                value = "Contact me for Technical queries , Suggestions , Advertising Options ......<br>\n"
            )

            First_Name
            (
                displayname  =  "Name"
                type  =  text
            )

            Email_Id
            (
                displayname  =  "EmailId"
                type  =  email
            )

            Webpage
            (
                type  =  text
            )

            Subject_field
            (
                displayname  =  "Subject"
                type  =  text
            )

            I_want_to
            (
                displayname  =  "I want to"
                type  =  picklist
                values  =  {"ask a technical query",   "ask a solution to my problem",   "advertise on Technova",   "regarding link exchange",   "Something else"}
            )

            About_me
            (
                displayname  =  "Your Message"
                type  =  textarea
            )

            actions
            {
                on add
                {
                    Submit
                    (
                        type  =  submit
                        displayname  =  "Submit"
                        on success
                        {
                            sendmail
                            (
                                To       :  "subhash.veeravalli@gmail.com" 
                                From     :  zoho.adminuserid 
                                Subject  :  "Technova" 
                                Message  :  "" + input.formdata 
                            )
                        }
                    )
                    Reset
                    (
                        type  =  reset
                        displayname  =  "Reset"
                    )
                }
                on edit
                {
                    Update
                    (
                        type  =  submit
                        displayname  =  "Update"
                    )
                    Cancel
                    (
                        type  =  cancel
                        displayname  =  "Cancel"
                    )
                }
            }
        }

        list  Contact_me_View
        {
            displayname = "Contact me View"
            show  all  rows  from  Contact_me 
            (
                ID
                Added_User as "Added User"
                Added_Time as "Added Time"
                Modified_User as "Last Modified User"
                Modified_Time as "Last Modified Time"
                First_Name as "First Name"
                Email_Id as "EmailId"
                Webpage
                About_me as "About me"
                Subject_field as "Subject"
                I_want_to as "I want to"
            )
            options
            (
                display rows = 100
            )
        }

    }

}
