@Susan, I beg to differ.... the modx->event->params array is filled with all the snippets parameters in the documentParser evalSnippet() function:
<?php
function evalSnippet($snippet, $params) {
$etomite= $modx= & $this;
$modx->event->params= & $params; // store params inside event object
if (is_array($params)) {
extract($params, EXTR_SKIP);
}
.......
@therebechips
Perhaps you are missing
Global $modx; inside your function? I did the test below and it certainly worked for me...
Snippet calls:
[!showEventParams!]
[!eForm? &formid=`test_1` &tpl=`test1` &thankyou=`test1Report` &noemail=`1` &eFormOnValidate=`showEventParams`!]
showEventParams snippet.
<?php
if( !function_exists('showEventParams') ) {
function showEventParams(&$fields){
global $modx;
$fields['event_params'] ='<pre>'.print_r($modx->event->params,true).'</pre>';
return true;
}
}
return '';
?>
Form and report template:
[+validationmessage+]
--------form---------------
<form method="post" action="[~[*id*]~]" id="test_1">
<p><label for="name">Name </label> <input type="text" name="fullname" size="30" maxlength="60" eform="Name::1" /></p>
<p><input class="verify" type="submit" name="Submit" value="Send"></p>
</form>
--------report-------------
<p>Here's the form results:</P
<p>Name: [+fullname+]</p>
<p>[+event_params+]</p>
Results:
Here's the form results:
Name: TobyL
Array
(
[snipPath] => D:/www/eFormDev/assets/snippets/eform/
[snipFolder] => eform
[vericode] =>
[formid] => test_1
[from] => [email protected]
[fromname] => Modx CMF demo
[to] => [email protected]
[cc] =>
[bcc] =>
[subject] =>
[ccsender] => 0
[sendirect] => 0
[mselector] => 0
[mobile] =>
[mobiletext] =>
[autosender] =>
[autotext] =>
[category] => 0
[keywords] =>
[gid] => 64
[noemail] => 1
[saveform] => 1
[tpl] => test1
[report] =>
[allowhtml] => 0
[replyto] =>
[language] => english
[thankyou] => test1Report
[isDebug] => 3
[reportAbuse] =>
[disclaimer] =>
[sendAsHtml] =>
[sendAsText] =>
[sessionVars] =>
[postOverides] => 0
[eFormOnBeforeMailSent] =>
[eFormOnMailSent] =>
[eFormOnValidate] => showEventParams
[eFormOnBeforeFormMerge] =>
[eFormOnBeforeFormParse] =>
[cssStyle] =>
[jScript] =>
[submitLimit] => 0
[protectSubmit] => 1
[requiredClass] => required
[invalidClass] => invalid
[runSnippet] =>
[autoSenderName] =>
[version] => 1.4.4
)