##### 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 was 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 all field 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] [have_life_outside_work_school] # end Define Variables Section ######################## *Error-Response* Information Section ############## ### # The *error-response* section will be displayed in html # when the form was not filled out correctly, when required fields, # flagged with req-, are not completed by the user, if code below # is entered. # # 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 html code. # # Make yourself a web page to see what it will looks like and paste code in the area below. # Save a web page with the name of the form hyphen and error.shtml. # See sample-error.shtml. View the code and paste the code below. ### # Put all fields from above to this area (without req) # put a message like: # Please press your browser's back button to the complete the required fields indicated below:

# [name]
# [email]
# then rest of fields. # This will display an error page taking the messages from the Define Variable Section # and display the fields or error messages on a page. # delete error and blank line # below to use ######################## Error Response Section ########################## # !!paste html code below the *error-response* line and remove # in front of the *error-response* line!! #*error-response* # end Error Response Section ######################## *Error-Response* Section ############## #*error-response* # # end Error Response Section ######################## E-mail Response Information Section ############## # This section allows information entered to be sent via an e-mail message. # # Change the information below for your form. Copy and paste your # field names from the *define-variables* section to the area below 'Subject'. # To the left of the [field name], type the actual field name to be displayed # in the e-mail message. ######################## 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 following two lines are for reference, make changes in the # *append-response* section. #!append-file-name="/ip/webnw/www/transform/sample.txt" #!append-file-name="/ip/webaccountname/www/folder/formname.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. This section is not necessary for form processing. # Download the text file to your local computer to view collectd data. # You may delete the file on the server to let it restart collection, keeping the # file small. # # 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 ######################### # delete 4 lines sample of variables below and insert your variables -- starting with [first_name] # !!paste variables below the !append-file-name line and remove # in front of the *append-response* and !append-file-name line!! #*append-response* #!append-file-name="/ip/webnw/www/transform/sample.txt" #[first_name], [last_name], [address], [city], [state], [zip_code], [phone], #[email], [comments], [recess], [likes_vacations], [likes_weekends], #[hates_vacations], [hates_weekends], [fruit], [snack], [home_snack], [likes_making_forms], #[have_life_outside_work_school] # end Append 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 html code. # # See sample-success.shtml. View the code and paste the code below. ######################## Success Response Section ######################## # !!paste html code below the *success-response* line and remove # in front of the *success-response* line!! #*success-response* # end Success Response Section #### end template for Sample Form Processing