Differences

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

english:phpwcms-system:article:contentparts:form:special-applications:php-script-and-function [2012/02/01 22:58]
Knut Heermann (flip-flop)
english:phpwcms-system:article:contentparts:form:special-applications:php-script-and-function [2018/06/03 18:09] (current)
Line 7: Line 7:
Since the release of r282 it is possible to process an own PHP function between the action “submit” and “sending the E-Mail”. This function can read all the form input, modify, and return it. See: [[english/phpwcms-system/article/contentparts/form/special-applications/php-function-include]] Since the release of r282 it is possible to process an own PHP function between the action “submit” and “sending the E-Mail”. This function can read all the form input, modify, and return it. See: [[english/phpwcms-system/article/contentparts/form/special-applications/php-function-include]]
-With this function, the e-mail address can not be manipulated. If we need this possibility, we have to switch over to another method. +However, the changed data is not recorded in the database, since these data have been written into it before. If we need this possibility, we have to switch over to another method.
-A simple script in "template/inc_script/frontend_init/" -folder is processed before the PHP function call of the form. +A simple script in template/inc_script/frontend_init/ -folder is processed before the PHP function call of the form.  
 + 
 +\\ 
 + 
 +The fundamental differences between a normal %%/frontend_init/..%% -Script and the special script //(PHP function :)// which can be triggered from the form: 
 + 
 +  * **Normal %%/frontend_init/..%% -Script**: All entries will be displayed in the variable **$_POST**. The values ​​are in  %%$_POST['EingabefeldName']%% and may be changed.. //(The changes are written to the DB.)// 
 + 
 +  * **Form %%/frontend_init/..%% -Script** //(PHP function:)//: The input variables **$mail** and **$postvar** are shown, but can not be changed. Die The templates "Send To" and "send copy to" in the variable **$form** are shown and can be changed. //(The changes are not written to the DB.)// 
 + 
 +\\
**Processing order:** **Processing order:**
-  - Deliver the form to the browser +  - Deliver the form to the browser. 
-  - User input +  - User input. 
-  - Submit: receiving the form with the user input +  - Submit: receiving the form with the user input. 
-  - Processing the /frontend_init/ -Scripts, e.g. to manipulate the contents of the variable %%$_POST['FieldName']%%. +  - Processing the %%/frontend_init/..%% -Scripts, e.g. to manipulate the contents of the variable %%$_POST['FieldName']%%. At this point, an deliberately error can be produced. The contents of a "required" field in %%$_POST['FieldName']%% will be deleted
-  - Export the form into the DB +  - Caching of form data to the database. 
-  - Processing PHP function call from the form+  - Processing PHP function call from the form. The contents of the variable %%$email%% and %%$postvar%% can be read, the contents of %%$form%% can be read and write. //(These changes are not recorded in the DB.)//
  - Check the fields that must be filled out ("required").   - Check the fields that must be filled out ("required").
-    * On error, continue with point **1.** +    * On error, continue at point **1.** with error code. 
-  - Sending e-mails+  - Export the cached form data into the DB. 
 +  - Sending e-mails.
<note important> <note important>
-Scripts in the /frontend_init/ -folder should be used with consideration, as this is an early intervention in the system process. These scripts should differentiate the site compared to the edited excerpt in order to avoid side effects.  +Scripts in the /frontend_init/ -folder should be used with consideration, as this is an early intervention in the system process. \\  
 +These scripts should differentiate the site compared to the edited excerpt in order to avoid side effects. E.g. at least query the category.  
</note> </note>
english/phpwcms-system/article/contentparts/form/special-applications/php-script-and-function.1328133531.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