Minor fix for eForm 1.4.1. If no ’validationmessage’ was set and the returned value is not equal to false then continue with sending email
Line 334 should read:
elseif ($eFormOnBeforeMailSent($fields)===false) { if( isset($fields['validationmessage']) && !empty($fields['validationmessage']) ) return formMerge($tpl,$fields); else return; }
Note the last "return" statement comes after the "else"

It makes working with html forms a treat!
I’m about half way into finishing up a project and I must say that eForm has saved me a lot of coding hours. It took away the need of having to validate my forms and made sending email reports a breeze
Many thanks to TobyL’s cool parser (I just can’t stop singing it’s praise)It makes working with html forms a treat!
... and for xwisdom too 
I love this eForm
Only the validation page is missing from the zip file? Cause i dont understand the validation explanation at the bottom of the index page.
but i have 1 problem.
If the email is sent, i recieve it. And if i want to reply to the mail, i have to click the link at the bottom of the mail.
Is there a way to put this in the $mail->FromName = $modx->config[’site_name’];
So i only have to click on the reply button in webmail.
Cuz if i click on the link now, it will open Outlook...
I run a ModX 0.9.2.1 with eForm 1.4.1 installation.
I have one problem that I can’t solve yet. After sending a form, if a user refreshes the "thank you" page it will resend the submitted data. Resulting in two or more emails sent to me. How can I prevent this from happenning?
Thank you
<?php
function onMailSentFunction( &$fields){
$_SESSION['eformSubmitted']=true;
return true; //important!
}
function onBeforeFormParseFunction( &$fields, &$templates ){
if( isset($_SESSION['eformSubmitted']) && $_SESSION['eformSubmitted'] && count($_POST)>0 ){
//kill the fields array... which makes the submit fail and display the form
$fields = array();
//kill the form template and replace with a message which will be displayed since any validation will fail
$templates['tpl'] = "<p>You have already submitted the form succefully.</p>"
}
return true; //important!
}
?>[[eformFunctions]] [!eForm? &eFormOnBeforeFormParse=`onBeforeFormParseFunction` &eFormOnMailSent=`onMailSentFunction` ...more params... !]
This discussion is closed to further replies. Keep calm and carry on.