Pre edit - Insert data

Pre edit - Insert data

nico077nico077 Posts: 55Questions: 14Answers: 2

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

Answers

  • allanallan Posts: 63,683Questions: 1Answers: 10,498 Site admin

    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 to return false; from the preEdit event handler to cancel the editing action.

    Allan

This discussion has been closed.