##### use for debugging remove #### next line #### !debug=3 #### # as first character indicates a comment and line will not be processed # # Template for Sample Form Processing - Information Version ######################## Define Variables Information Section ################ # This section is defining whether a variable is required. # If req- is in front of the variable, it is required. # If it is not in front of a variable, then it is not required. # # You need only list req- variables, but you may also list # all variables as an easier way to collect variables for use # throught this .tpl via cut and paste. # # note: When using 'e-mail' (with a hyphen) a generic IU server e-mail will # be processed not what they entered. So don't use the hyphen when creating a # field name for email. # # To supply a specific error message for the required variables on the generic report # use the following code, i.e. after the [req-email] line add the code shown in # next line. # #[req-email] = " Please enter an email address " # # In this area PASTE (to prevent typos) your field names from the form. # enter your filed names - they can be used to paste elsewhere in this form. ######################## Define Variables Section ######################### *define-variables* [req-first_name] = " Please enter your first name " [req-last_name] = " Please enter your last name " [address] [city] [state] [zip_code] [phone] [req-email] = " Please enter your email address " [comments] [recess] [likes_vacations] [likes_weekends] [hates_vacations] [hates_weekends] [fruit] [snack] [home_snack] [likes_making_forms] [has_life_outside_work_school] # end Define Variables Section ######################## E-mail Response Section ######################### *email-response* To:khorvath@iun.edu From:[email] Subject: Sample Form Processing First Name: [first_name] Last Name: [last_name] # Address variable the form requested is not required only put in e-mail if entered !print-if [address] ne"" Address: [address] !end-print-if # City variable the form requested is not required only put in e-mail if entered !print-if [city] ne"" City: [city] !end-print-if # State variable the form requested is not required only put in e-mail if entered !print-if [state] ne"" State: [state] !end-print-if # Zip Code variable the form requested is not required only put in e-mail if entered !print-if [zip_code] ne"" Zip Code: [zip_code] !end-print-if E-mail: [email] # Comments variable the form requested is not required leave in e-mail showing it blank, but # put a blank line between comments and recess to have it show on one line Comments: [comments] !print-if [comments] eq "" !end-print-if # Recess variable the form requested is not required leave in e-mail showing it blank, but # put a blank line between recess and likes_vacations to have it show on one line Recess: [recess] !print-if [recess] eq "" !end-print-if Likes Vacations: [likes_vacations] !print-if [likes_vacations] eq "" !end-print-if Likes Weekends: [likes_weekends] !print-if [likes_weekends] eq "" !end-print-if Hates Vacations: [hates_vacations] !print-if [hates_vacations] eq "" !end-print-if Hates Weekends: [hates_weekends] !print-if [hates_weekends] eq "" !end-print-if Fruit: [fruit] !print-if [fruit] eq "" !end-print-if Snack: [snack] !print-if [snack] eq "" !end-print-if Home Snack: [home_snack] !print-if [home_snack] eq "" !end-print-if Likes Making Forms? [likes_making_forms] !print-if [likes_making_forms] eq "" !end-print-if Has Life? [have_life_outside_work_school] !print-if [have_life_outside_work_school] eq "" !end-print-if # end E-mail Response Section ######################## Append Response Information Section ############ # The *append-response* section allows the information to be appended to a data file. # The .txt file can be read with a text reader, spreadsheet, or imported to a database. # In this example, sample.txt text file was saved in the transform folder. # # Change the webnw to your web account name, change the transform folder # to the folder where your form is located, change the sample to the name of # your form. The next line is for reference, make changes in the # working *append-response* area. #!append-file-name="/ip/www/transform/sample.txt" # # See more extensive samples at # http://webmaster.indiana.edu/tool_guide_info/transform3.shtml#append # # For more than one text file use *append-response* before each file. # *append-response* # !append-file-name="/ip/webnw/www/transform/sample.txt" # *append-response* # !append-file-name="/ip/webnw/www/transform/sample_additional_info.txt" # # If you don't want to use this section, place # at the first position of # each line in this section. # # Change the information below for your form if you wish to be able to save # the information to a text file. Copy and paste your # field names from the *define-variables* section putting a comma and # space between fields. ######################## Append Response Section ######################### *append-response* !append-file-name="/ip/webnw/www/transform/sample.txt" [first_name], [last_name], [address], [city], [state], [zip_code], [phone], [fax], [email], [comments], [recess], [likes_vacations], [likes_weekends], [hates_vacations], [hates_weekends], [fruit], [snack], [home_snack], [likes_making_forms], [has_life_outside_work_school] # end Append Response Section ######################## Error Response Information Section ########################## # The *error-response* section will be displayed in html format # when the form was not filled out correctly, when required fields, # flagged with req-, are not completed by the user if you place # code below. # # If you don't complete this section a generic error message will be displayed. # If you Supply a specific error message in the *define-variables* area # that message will be displayed when the generic error message is displayed. # # This area is to allow an error message to be sent back to the user's browser # it must be in the form of a html document. # # Make yourself a web page to see what it will looks like and paste code in the area below. # usually I save the web page with the name of the form hyphen and error.shtml. # see sample-error.shtml. I view the code and paste the code below. ######################## Error Response Section ########################## #*error-response* # !!paste html Code here and remove # in front of the two lines!! # end Error Response Section ######################## Success Response Information Section ############ # The *success-response* section allows a web page to be displayed to # the user on the web. Because this is being sent back to the user's browser # it must be in the form of a html document. # # See sample-success.shtml. I view the code and paste the code below. ######################## Success Response Section ######################## #*success-response* # !!paste html Code here and remove # and ## in front of the two lines!! # end Success Response Section #### end template for Sample Form Processing