<a href="javascript: window.history.go(-1)">Edit</a>
<?php // Loop through each column, and insert it if present in the form foreach ( $tblColumns as $tblCol ){ if (isset ( $_SESSION ['krediet'] [$tblCol] )){ $dbTable [$tblCol] = $_SESSION ['krediet'] [$tblCol]; } } $dbTable [datum] = time (); // Run the db insert query $dbQuery = $modx->db->insert ( $dbTable, 'krediet_aanvragen' ); // set alle velden weer in $fields zodat we een report kunnen maken met alle velden. $fields = $dbTable; $fields['test'] = "test123"; $fields['formid'] = "watleuk"; return true;
if(!function_exists("elipsTriaOnbeforeMergeFunction")){ //Display different form depending on session function elipsTriaOnbeforeMergeFunction( &$fields ){ global $modx,$formats; foreach ($formats as $key=>$val) if (empty($_POST[$key]) ) //doesn't work with $fields[$key] if (isset($_SESSION['mySession'][$key])) switch ($formats[$key][2]) { //data type case 'integer': case 'float': //strip formatting $fields[$key] = (float) str_replace("'",'',$_SESSION['mySession'][$key]); break; default: $fields[$key] = $_SESSION['mySession'][$key]; } else //set standard values switch ($key){ case 'begindate': $fields[$key] = strftime("%d.%m.%Y",time()); break; } } }
if(!function_exists("beforeMailSentFunction")){ //store results in session and advance form function beforeMailSentFunction(&$fields){ global $modx; if (!is_array($_SESSION['mySession'])) $_SESSION['mySession'] = array(); //save values in session $_SESSION['mySession'] = array_merge ($_SESSION['mySession'],$fields); $step = isset($fields['formStep'])?$fields['formStep']:1; // don't use $fields['backbutton'] because its set anyway by eForm $backbutton = $_POST['backbutton']? -1:1; $step = max($step + $backbutton,1); //prepare next step $_SESSION['mySession']['formStep'] = $step; //prepare next step if ($step > 2){ //last form // clear formstep unset($_SESSION['mySession']['formStep']); return true; // } // except for the last step we clear the $_POST array // and bypass eform and re-open the page with the next form //unset($_POST); - doesn't work in php 4.3.xx $_POST = array(); $modx->sendForward($modx->documentIdentifier); return false; // } }