We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 41440
    • 5 Posts
    Hi all, im writing parser for xml document and want to set plugin OnBeforeDocFormSave:
    if ($id == 14 && empty($_POST['tv5']))
    {
        return $modx->error->failure('error, please specify valid xml file');
    }
    

    But how can i return error to resource save panel?
    Sorry for my English, its not my native language.

    This question has been answered by shot131. See the first response.

    [ed. note: shot131 last edited this post 13 years, 7 months ago.]
    • discuss.answer
      • 41440
      • 5 Posts
      I found answer by myself, it was very easy
      $modx->event->output('error message');
      return FALSE;