greetings ...
i’m trying to write a simple plugin that on Document Save will create a folder on the server that takes the document id as the folder name. i’m using the OnDocFormSave event. This works fine on Edit/Save but on New/Save the system clearly doesn’t yet know the document id. how can i get the new docid on New/Save within the same plugin? is it possible?
any thoughts/pointers greatly appreciated!!
:)
Yep, I got it to work in the OnDocFormSave event with:
[tt]$e = $modx->Event;
$docid = $e->params[’id’];[/tt]