We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40804
    • 7 Posts
    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.