My function looks like this:
# called on eFormOnValidate
function checkPassword(&$fields, &$vMsg, &$rMsg, &$rClass) {
global $modx;
if($fields['password'] != $fields['password-confirm']){
$vMsg['password'] = "Password » Passwords must match";
$rClass['password'] .= $rClass['password'] ? ' ' . 'required' : 'required'; // hardcode css class name :(
}
return true;
}
print_r($modx->event) outputs this:
SystemEvent Object ( [name] => OnParseDocument [_propagate] => 1 [_output] => [activated] => [activePlugin] => PHx ) 1
( print_r($modx->event->params) output nothing )
So I think the PHx plugin may be preventing the parameters being stored in the event object?
EDIT: just tried disabling PHx and print_r($modx->event) outputs this:
`*]
SystemEvent Object ( [name] => [_propagate] => 1 [_output] => [activated] => [activePlugin] => ) 1
.. and print_r($modx->event->params) now outputs:
Now I’m confused!