Mailformplus (tx mailformplus): Unterschied zwischen den Versionen

Aus Wikizone
Wechseln zu: Navigation, Suche
Zeile 24: Zeile 24:
 
  }
 
  }
 
  }
 
  }
 +
 +
The variable $params will hold the following values:
 +
 +
$params[config] ... config variables passed via TypoScript: example: saveUserFunc.dummy = hello can be accessed by $params[config][dummy]
 +
 +
$params[data] ... all submitted GET and POST variables merged
 +
 +
activate the hook with TypoScript
 +
 +
You have to define the user function that should be called when the form was submitted correctly:
 +
 +
plugin.tx_thmailformplus_pi1.saveUserFunc = EXT:myext/class.tx_myext.php:tx_myext->doit
 +
 +
You can also define “variables” which will be passed to the user function:
 +
 +
plugin.tx_thmailformplus_pi1.saveUserFunc.dummy = hello
 +
 +
  
 
===Beispielkonfiguration (alt-brettheim.de)===
 
===Beispielkonfiguration (alt-brettheim.de)===
Zeile 48: Zeile 66:
 
   #saveDB.debug = 1
 
   #saveDB.debug = 1
 
</pre>
 
</pre>
The variable $params will hold the following values:
 
 
$params[config] ... config variables passed via TypoScript: example: saveUserFunc.dummy = hello can be accessed by $params[config][dummy]
 
 
$params[data] ... all submitted GET and POST variables merged
 
 
activate the hook with TypoScript
 
 
You have to define the user function that should be called when the form was submitted correctly:
 
 
plugin.tx_thmailformplus_pi1.saveUserFunc = EXT:myext/class.tx_myext.php:tx_myext->doit
 
 
You can also define “variables” which will be passed to the user function:
 
 
plugin.tx_thmailformplus_pi1.saveUserFunc.dummy = hello
 

Version vom 3. April 2007, 10:15 Uhr

Post processing der Formularfelder

Hook for post-processing submitted fields

(available since 3.7, thx to Martin Kutschker)

This hook gives you the possibility to save or process the submitted fields after the form was successfully submitted.

Standard mailformplus functionality like sending mail(s) or inserting records are not influenced by this hook.

how to use the hook:

  • define a user-function which will do the processing
  • create a php file with a class and function which will be called when the form was submitted:

example:

class.tx_myext.php

content:

class tx_myext {
function doit(&$params, &$ref){
......
}
}

The variable $params will hold the following values:

$params[config] ... config variables passed via TypoScript: example: saveUserFunc.dummy = hello can be accessed by $params[config][dummy]

$params[data] ... all submitted GET and POST variables merged

activate the hook with TypoScript

You have to define the user function that should be called when the form was submitted correctly:

plugin.tx_thmailformplus_pi1.saveUserFunc = EXT:myext/class.tx_myext.php:tx_myext->doit

You can also define “variables” which will be passed to the user function:

plugin.tx_thmailformplus_pi1.saveUserFunc.dummy = hello


Beispielkonfiguration (alt-brettheim.de)

Version von Ende 2006

###  mailformplus konfigurieren ###
#Checkbox 'Zustimmung zur Datenspeicherung' soll nicht in der DB gespeichert werden
plugin.tx_thmailformplus_pi1{
  #email_redirect = 547
  saveLog.exclude = datenspeicherung
  #Speicherung in die Datenbank
  saveDB = 1
  saveDB.dbkey=uid
  saveDB.dbTable = pupKarte
  saveDB.fileUpload = fileadmin/pupKarte/
  saveDB.fileTypes = jpg,jpeg,png,JPG,JPEG,PNG
  saveDB.fileSize = 1000000

  #Schlüsselfeld der DB-Tabelle
  #Datenbank zuordnung
  saveDB.mapping = photo:fileid,geb18:geb18,name:name,vorname:vorname,gebDatum:gebDatum,strasse:strasse,plz:plz,ort:ort,gruppe:gruppe,andereGruppe:andereGruppe,funktionGruppe:funktionGruppe,vabmitglied:vabmitglied,waffentraeger:waffentraeger,dekowaffe:dekowaffe,messer:messer,dolchEinseitig:dolchEinseitig,dolchZweiseitig:dolchZweiseitig,hiebwaffe:hiebwaffe,stichwaffe:stichwaffe,stangenwaffe:stangenwaffe,bogen:bogen,armbrust:armbrust,sonstigeWaffen:sonstigeWaffen,sprengstofferlaubnis:sprengstofferlaubnis,uneingeschraenkt:uneingeschraenkt,sonstigeWaffeArt:sonstigeWaffeArt,behoerde:behoerde,erlaubnisNr:erlaubnisNr,weitereGenehmigung:weitereGenehmigung,mitgliedSeit:mitgliedSeit,weitereVabMitgliedschaft:weitereVabMitgliedschaft,funktionen:funktionen,ehrungen:ehrungen,telefon:telefon,email:email,internWirdBezogen:internWirdBezogen,internErwuenscht:internErwuenscht,sonstiges:sonstiges
  #nicht ausgefüllte Felder ausfüllen...
  #saveDB.if_is_empty.dekowaffe = ka
  #saveDB.debug = 1