I hate to bug you, but I’ve been testing this and for some reason it’s not working out. The e-mail is still being sent ok, but the page stays on the same id as the form, but goes blank. I have to type in a different id, then go back to that page just to get the form to show up again. If I keep refreshing while it’s blank, it says that the data has already been sent. Here’s what I have so far:
The page call:
[[thankYouRedirect]]
[!eForm? &formid=`RegForm` &subject=`[+subject+]` &to=`[email protected]` &from=`[email protected]` &fromname=`Webmaster` &replyto=`[+email+]` &ccsender=`0` &tpl=`RegForm` &report=`RegFormReport` &invalidClass=`invalidValue` &requiredClass=`requiredValue` &cssStyle=`ContactStyles` &eformOnMailSent=`onMailSentEvent` !]
The snippet "thankYouRedirect":
<?php
function onMailSentEvent(&$fields){
global $modx;
switch($fields['code']){
case 'code1':
$id = 71;
break;
case 'code2':
$id = 74;
break;
case 'code3':
$id = 79;
break;
default:
$id = 80;
}
$modx->sendRedirect($modx->makeUrl($id, '', '', 'full'));
?>
The input from the form:
<input name="code" id="cfCode" class="text" type="text" />
I’ve thought it was a syntax error (which it still might be), so I’ve been combing over this for an hour trying to eliminate that option. The process makes sense to me, but perhaps I’m still making a stupid mistake someplace. Any help is greatly appreciated! Thank you so much!