...use the eFormOnMailSent event and you’ll have the behaviour that you want. The event is a bit of misnomer, it get’s "fired" regardless if you sent mail or not.
The duplicate submit protection happens after the eFormOnBeforeMailSent event. Instead use the eFormOnMailSent event and you’ll have the behaviour that you want. The event is a bit of misnomer, it get’s "fired" regardless if you sent mail or not.
<?php }//end test nomail <---- MOVE TO HERE # added in 1.4.2 - Protection against multiple submit with same form data if($protectSubmit) $_SESSION[$formid.'_hash'] = $hash; //hash is set earlier # added in 1.4.2 - Limit the time between form submissions if($submitLimit>0) $_SESSION[$formid.'_limit'] = time(); /* * mod - by JJ removed reference from function call as it's deprecated in current PHP * Remember to treat parameter as a reference in function!! */ # invoke OnMailSent event set by another script if ($eFormOnMailSent) { if( $isDebug && !function_exists($eFormOnMailSent) ) $fields['debug'] .= "eFormOnMailSent event: Could not find the function" . $eFormOnMailSent; else if ($eFormOnMailSent($fields)===false) return; } // }//end test nomail <---- MOVE FROM HERE ?>
Hi, I don’t understand where I can set the table to store the information to. Is it in the snippet or somewhere else? Thanks.
// Run the db insert query
$dbQuery = $modx->db->insert( $dbTable, $table_prefix . ’insertTableName’ );
Does this mean I can only have one form per installation? Is there a way to insert values for different forms into different tables? Thanks.