For what it’s worth this is how I normally do this sort of thing:
1) Create a snippet named eformUserData (or whatever you want) and paste this into it:
<?php
// function to add user info to email
function eformUserData( &$fields ){
global $modx;
$fields['formDate']= time();
$fields['formIP']= $_SERVER['REMOTE_ADDR'];
$fields['webShortname']= $_SESSION['webShortname'];
$fields['webFullname']= $_SESSION['webFullname'];
$fields['webEmail']= $_SESSION['webEmail'];
return true;
}
return '';
?>
2) Place the new snippet call directly before the eForm call:
[[eformUserInfo]]
[!eForm? &formid=`testForm` &subject=`[+subject+]` &to=`[email protected],` &ccsender=`1` &tpl=`testForm` &report=`testFormReport` &invalidClass=`invalidValue` &requiredClass=`requiredValue` &cssStyle=`ContactStyles` &gotoid=`46` &eFormOnBeforeMailSent=`eformUserData` !]
Notice I removed the sessionVar parameter and added the &eFormOnBeforeMailSent event call and assigned the name of the function.
3) Now you will have the the [+formDate+], [+formIP+], [+webShortName+], [+webFullName+] and [+webEmail+] placeholders to use in the report tpl.
This is how to use the eForm event feature