Hi all.
I have a custom CMP developed and am using the addFieldError function to display error messages were appropriate, but I am keen for a popup of these error messages to display.
I've added the following to my the beforeSave function in my processor - but it seems like a daft way to do this.
if ($this->hasErrors()) {
foreach ($this->modx->error->errors AS $e) {
$errStr .= $e['msg'].'<br>';
}
$this->failure($errStr);
}
Is there another/proper way for me to get these messages to display?
Ta.