Differences

This shows you the differences between two versions of the page.

deutsch:phpwcms-system:artikel:contentparts:formular:spezielle-anwendungen:contentpart-nach-formular [2009/09/17 13:46]
Knut Heermann (flip-flop)
deutsch:phpwcms-system:artikel:contentparts:formular:spezielle-anwendungen:contentpart-nach-formular [2018/06/03 18:08] (current)
Line 41: Line 41:
   
Diese Funktion kann alle Formulareingaben lesen, verändern und zurückgeben. Sie legt sich zeitlich zwischen die Aktion submit und dem Versenden der eMail. Diese Funktion kann alle Formulareingaben lesen, verändern und zurückgeben. Sie legt sich zeitlich zwischen die Aktion submit und dem Versenden der eMail.
 +
 +Der Funktionsaufruf muss im Formular im Feld "PHP-Funktion:" unterhalb **"Empfänger - Vorlage:"** eingetragen werden. //(Siehe Bild unten)//.
<note tip> <note tip>
Line 61: Line 63:
\\ \\
 +==== Das Skript ====
 +
 +in **template/inc_sript/frontend_init/my_form_do_it.php**
 +
 +Hier beispielhaft der Aufruf des ContentPart mit der ID=2
 +
 +<code php|h my_form_do_it.php |h>
 +<?php
 +// -------------------------------------------------------------------------------------------
 +// obligate check for phpwcms constants
 +  if (!defined('PHPWCMS_ROOT')) {
 +    die("You Cannot Access This Script Directly, Have a Nice Day."); }
 +// -------------------------------------------------------------------------------------------
 +
 +// Einfaches Skript fur den Aufruf eines CPs aus einem Formular heraus nach dem submit.
 +
 +
 +function my_form_do_it( &$postvar, &$form, &$mail ) {
 +
 +    $form['onsuccess'] .= '{SHOW_CONTENT:CP,2}';
 +}
 +
 +?>
 +</code>
 +
 +\\
---- ----
---- ----
Line 100: Line 128:
-\\ 
-~~UP~~ 
-===== Das Skript ===== 
-in **template/inc_sript/frontend_init/my_form_do_it.php** 
-Hier beispielhaft der Aufruf des ContentPart mit der ID=2 
- 
-<code php > 
-<?php 
-// ------------------------------------------------------------------------------------------- 
-// obligate check for phpwcms constants 
-  if (!defined('PHPWCMS_ROOT')) { 
-    die("You Cannot Access This Script Directly, Have a Nice Day."); } 
-// ------------------------------------------------------------------------------------------- 
- 
-// Einfaches Skript fur den Aufruf eines CPs aus einem Formular heraus nach dem submit.  
- 
- 
-function my_form_do_it( &$postvar, &$form, &$mail ) { 
- 
-    $form['onsuccess'] .= '{SHOW_CONTENT:CP,2}'; 
-} 
- 
-?> 
-</code> 
   
deutsch/phpwcms-system/artikel/contentparts/formular/spezielle-anwendungen/contentpart-nach-formular.1253187999.txt.gz · Last modified: 2018/06/03 18:07 (external edit)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0