Frage über Postdata vom Powermail-Formular
| Autor | Nachricht |
|---|---|
|
Verfasst am: 21. 07. 2012 [16:56]
|
|
|
rubenamerica
Themenersteller
Dabei seit: 21.07.2012
Beiträge: 1
|
hallo Hoffentlich darf ich hier mein Problem im englischen melden. Sonicht, dann will ich es gerne im deutschen versuchen... I'm new to Typo3 and I truly find it an amazing system but I'm facing a problem I cannot find an answer for: I want to run a custom php script when sending a form (via the powermail extension) - I have put a php include to my php page in class.tx_powermail_submit.php - my included php page simply sends a mail message to my mail address; later on, I want to do something else, namely calling to the API of Moneybird (this is a Dutch system for creating invoices); but to get to that stage, I first need to know how I can "read" or address to the fields in my powermail form in the code below you can find a piece of the code (which is just an example, it is not the definite code I will be using) the question is thus: how (which format/which code example) can I use to read out and use the value of a powermail form field in my own php page some examples that I already tried, but without success: $GLOBALS['TSFE']->fe_user->sesData['powermail_pi1']['uid83'] $tx_powermail_pi1[uid83] many thanks in advance for helping me out on this one Ruben America ----------------------------- $facturatie = "moneybird"; if($facturatie == "moneybird" $Naam = $GLOBALS['TSFE']->fe_user->sesData['powermail_pi1']['uid83']; $EmailAdres = $tx_powermail_pi1[uid96]; $Bericht = $tx_powermail_pi1[uid97]; $formsent = mail('innovedia@gmail.com', 'Gegevens afkomstig van formulier', "Naam: $Naam Bericht: $Bericht", "From: $EmailAdres Bounce-to: innovedia@gmail.com" } |
|
Verfasst am: 23. 07. 2012 [10:02]
|
|
|
vince
Dabei seit: 29.10.2010
Beiträge: 123
|
hello, you can access _POST and _GET data with t3lib::_GP (post and get), t3lib_div::_GET or t3lib_div::_POST http://doc-typo3.ameos.com/4.1.0/classt3lib__div.html#af8ccea9a538cf0ab765fbbed79dba46 example: t3lib::_GP('tx_powermail_pi1') will return an array with all _GET and _POST data (priority to post) for the plugin tx_powermail_pi1. You can also access single parameters with t3lib::GPvar('tx_powermail_pi1[uidx]'); regards, Vince. PS: you also might want to take a look at this: http://typo3.org/extension-manuals/powermail/1.5.0/view/1/13/ For adding own code to plugins most TYPO3-Extensions provide "Hooks". [Dieser Beitrag wurde 1mal bearbeitet, zuletzt am 23.07.2012 um 10:13.] |



