Pre edit - Insert data
Pre edit - Insert data
Hello,
I've got a problem when i use :
->on( 'preEdit', function ( $editor, $values ) {
$editor
->field('budget.date_modification')
->setValue(date("Y-m-d H:i:s"));
$editor
->field('budget.dernier_editeur')
->setValue($_SESSION['anat_v2_nni']);
} )
I want to cancel the insert when the $_SESSION is empty ?
How can i do that ?
Best regards,
Nicolas
This discussion has been closed.
Answers
Currently the
pre*
server-side events are not cancellable. However, that will change with the release of Editor 1.6 which should be tomorrow or Wednesday. With 1.6 you will be able toreturn false;
from thepreEdit
event handler to cancel the editing action.Allan