Access a TV from OnBeforeDocFormSave


is it possible to access a TV (Template Variable) from a plugin which handles the OnBeforeDocFormSave envent?

Many thanks in advance for your help

Hi @spechto,

It is better to do it with OnDocFormSave instead, please see explanation and examples here: OnDocFormSave - System Events | MODX Documentation

OnBeforeDocFormSave event actually occurs before the document is saved, but after all the variables for insertion have been defined. There is no way you can change them here.

Hi @himurovich,

that’s the solution!

Many Thanks