Hi Guys,
I have chronoforms setup with the auth.net plugin and functioning nicely. I have placed the following PHP code to run after "On Submit code - after sending email":
The code seems to work just fine, but it displays my messages in the module position above the form and instead I would like it to display in the main content area. How do I go about doing this?
I have chronoforms setup with the auth.net plugin and functioning nicely. I have placed the following PHP code to run after "On Submit code - after sending email":
<?php
$MyPlugins =& CFPlugins::getInstance($MyForm->formrow->id);
$MyPlugins->runPlugin('after_email', array('ONSUBMIT', 'ONLOADONSUBMIT'), 'cf_Authorize_dotnet');
if($MyPlugins->cf_Authorize_dotnet['response_code'] == 'Approved'){
echo "Thank you for your purchase. You will be receiving a confirmation email shortly";
$MyFormEmails =& CFEMails::getInstance($MyForm->formrow->id);
$MyFormEmails->setEmailData(1, 'enabled', '1');
$MyFormEmails->sendEmails($MyForm, $MyFormEmails->emails);
}else{
$MyForm->addErrorMsg( 'An error occured with the Credit Card Processing:<br />'.$MyPlugins->cf_Authorize_dotnet['response_code'].': '.$MyPlugins->cf_Authorize_dotnet['response_reason_text'] );
$MyForm->haltFunction["autogenerated_after_email"] = true;
}
?>
The code seems to work just fine, but it displays my messages in the module position above the form and instead I would like it to display in the main content area. How do I go about doing this?