Hello guys!
with onbeforedocsave i notice the save process before saving. Is there any possibility to stop that process (something like "return false"...)?
regards, fabi
I think the save will abort if you return a string containing an error message.
return; with no return value or return false; should let the save proceed.
If I return some value from my Plugin, the Message will print to the Logfile:
[2014-10-03 14:14:16] (ERROR @ /conn-ajax/index.php) [OnBeforeDocFormSave]MESSAGE!
But the resource will be saved :-(.
MODX Rocks I am so glad that I have found it.
This is the solution:
If you send some Output to the user, the document will not be saved:
$modx->event->output("I won't let you save this!");
That's all you have to do.
MODX Rocks I am so glad that I have found it.