Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Oké, akkor ez a kód:
- <?php
- ###
- ### Find below examples for your custom routines. Do not change the function names.
- ###
- ### my_cforms_logic() : gets triggered throughout cforms, supporting real-time configuration
- ###
- ### my_cforms_action() : gets triggered just before sending the admin email
- ###
- ### my_cforms_filter() : after validation, before processing/saving input data (nonAJAX)
- ###
- ### my_cforms_ajax_filter() : after validation, before processing/saving input data (AJAX)
- ###
- ### TO USE THE FUNCTIOS:
- ### >>> uncomment the functions as required
- ### >>> and provide your custom code where appropriate
- ###
- ### Your custom application logic features
- ###
- ### "successMessage" $cformsdata = cforms datablock
- ### "redirection" $cformsdata = cforms datablock
- ### "filename" $cformsdata = $_REQUEST
- ### "adminTO" $cformsdata = cforms datablock
- ### "nextForm" $cformsdata = cforms datablock
- ###
- ### "adminEmailTXT" $cformsdata = cforms datablock
- ### "adminEmailHTML" $cformsdata = cforms datablock
- ### "autoConfTXT" $cformsdata = cforms datablock
- ### "autoConfHTML" $cformsdata = cforms datablock
- ###
- /* <--- move or remove this line to uncomment functions below (and check the end as well!)
- */
- function my_cforms_logic($cformsdata,$oldvalue,$setting) {
- /*
- ### If you're unsure how to reference $cformsdata use the below @mail call to send you the data array
- */
- @mail('jgabor@civir.hu', 'cforms my_action test', print_r($cformsdata,1), 'From: jgabor@civir.hu');
- /*
- ### example: changes the admin email address to "test123 <my@dif..." if placeholder 'placeholder' is found
- */
- if ( $setting == "adminTO" ){
- if ( $oldvalue=='placeholder') {
- return 'gabor@caekcraft.co.uk';
- //return $cformsdata['data']['kapcsolattartó emailcíme'];
- }
- }
- return $oldvalue;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement