All pastes #434137 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-04-11 07:37 UTC
rendered paste body
######################################
# EXAMPLE TypoScript configuration
# used with "multipage.html" template
######################################

######################################
# general configuration/setting
######################################
plugin.tx_thmailformplus_pi1 {
    #######################
    # limit the number of mails that 
    # are sent to the user
    #
    # spam-protection!!!
    #
    # default: 2
    # a value of "2" means:
    #  if the user types in several emailadresses (spam!)
    #  into the email field, only 2 are sent.
    #
    #######################
  limitMailsToUser = 1
}

######################################
# config for multipage forms
######################################
plugin.tx_thmailformplus_pi1.multiPage {
#  ###############
#  # JavaScript called before form is submitted
#  # .js    ... every step
#  # .1.js  ... only in step 1
#  ###############
  js = alert('general javascript');
  1 {
    js = alert('step1 javascript');
  }
  2 {
    js = alert('step2 javascript');
  }
}

######################################
# here we overwrite the default configuration for 
# file uploads defined in saveDB. for one 
# specific field
######################################
plugin.tx_thmailformplus_pi1.fieldConf {

  ######################
  # improved error check
  #
  # Info:
  # error-check is performed for every field 
  # having a .errorCheck value defined here in TS
  #
  # works together with "required" fields settings 
  # from mailformplus record
  #
  # example:
  # mailformplus record "required" field is filled out with "email"
  # here in TS we have defined:
  #    email.errorCheck = email, optional
  # so the value is optional - but if it's filled out, 
  # it's validated to be a correct email address
  #
  ######################
  # .errorCheck can be one of the following:
  #
  # - email ..... validated as email
  # - integer ... validated as integer 
  # - float  .... validated as float ("." and "," allowed!)
  # - required ... must be filled out
  # - optional ... field is optional, but if it's filled out, 
  #                it's validated to the rest of errorChecks defined
  # - date ... validated as date. format can/has to be specified
  #            example:
  #            errorCheck = date:dd/mm/yyyy
  #            errorCheck = date:d.m.y
  #            format is case insensitive. so dd/mm/yyyy is the same as DD/MM/YYYY
  #
  # - time ... validated as time. format can/has to be specified
  #            example:
  #            errorCheck = time:hh:mm
  #            errorCheck = time:h-m
  #            format is case insensitive. hh:mm equals HH:MM
  #
  # - ereg ... validated to match the regexp given
  #            example for correct IP validation:
  #            errorCheck = ereg:^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$
  #
  # - eregi ... like "ereg" but case insensitive
  #
  ######################
  # you can specify multiple errorchecks by separating them by ","
  # example
  # - errorCheck = required, email
  ######################
  #
  # .errorText ... text beeing displayed when error occurs
  #
  #  Info: 
  #  errorText overwrites the error-subtemplate value defined in the template
  #
  #######################

   name{
    errorCheck = email,required
    errorText = <li>fill out a correct email</li><br>
    defaultValue.value = 
  }
    subject {
    errorCheck = email,required
    errorText = <li>fill out a correct email</li><br>
    defaultValue.value = 
  }
 
  
  job {
    errorCheck = required
    errorText = JOB not filled out!!<br>


hobby {
		errorText =
	defaultValue.value = test
}

  ######################
  # example for file-upload field
  ######################
  picture {
    errorCheck = required
    numberOfAllowedFiles = 2
    fileTypes = gif
    fileSize = 2000000
    fileUpload = uploads/pics/
      ###########################
      # template
      ###########################
      # markers:
      # fileName ... uploaded filename
      # fileSize ... size of uploaded file
      # filePath ... path to uploaded file
      # linkDelete_start ... <a>-start-tag
      # linkDelete_stop  ... </a>-end-tag
      ###########################
      # template for all steps
      ###########################
    uploadedFiles {
      template = <tr><td>###fileName###</td></tr>
      wrap = <table border="0" cellspacing="0" cellpadding="0">|</table>
    }
      ###########################
      # template only for step 3
      ###########################
    uploadedFiles.3 {
      template = <tr><td>###fileName###</td><td>&nbsp;###linkDelete_start### remove file###linkDelete_stop###</td></tr>
      wrap = <table border="0" cellspacing="0" cellpadding="0">|</table>
    }
      ###########################
      # template only for PRINT template
      ###########################
    uploadedFiles.print {
      template = <tr><td><a href="###filePath######fileName###" target="_blank">###fileName###</a> (###fileSize###)</td></tr>
      wrap = <table border="0" cellspacing="0" cellpadding="0">|</table>
    }
      ###########################
      # template only for mail (default for receiver and user)
      ###########################
    uploadedFiles.mail {
      plainTemplate = ###filePath######fileName###
      HTMLTemplate = ###filePath######fileName###<br>
      plainWrap = File start:|file end
      HTMLWrap = File start:|file end<br>
    }
      ###########################
      # template only for mail (receiver)
      # use marker ###[name of inputfield]Receiver### in template
      ###########################
    uploadedFiles.mailReceiver {
      plainTemplate = ###filePath######fileName###\n
      HTMLTemplate = <a href="###filePath######fileName###">###fileName###</a><br>
      plainWrap = ReceiverFile start:|file end
      HTMLWrap = ReceiverFile start:|<br>file end<br>
    }
      ###########################
      # template only for mail (user)
      # use marker ###[name of inputfield]User### in template
      ###########################
    uploadedFiles.mailUser {
      plainTemplate = ###filePath######fileName###\n
      HTMLTemplate = <a href="###filePath######fileName###">###fileName###</a><br>
      plainWrap = ReceiverFile start:|file end
      HTMLWrap = ReceiverFile start:|<br>file end<br>
    }
  }
}


plugin.tx_thmailformplus_pi1.saveDB = 1
plugin.tx_thmailformplus_pi1.saveDB {
  dbTable = tx_qcom_FilmDB_Filme_ch_test
  saveDB.fileUpload = uploads/tx_qcom_FilmDB
  # change 192 to an existing page-ID in your TYPO3 project
//   dbinsert=pid:86,hidden:1,CType:textpic
  # if dbkey is not set: "uid" is taken
  dbkey =id
  # [inputFieldName]:[DBName]
//   mapping=surename:header,email:header,picture:image
  debug = 0
}