preEdit select database data

preEdit select database data

ClarenceClarence Posts: 19Questions: 7Answers: 0
edited August 2018 in Free community support

If I use preEdit, can I know the current DB content?
I want to compare current DB content and user value

Replies

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    Yes indeed:

    ->on( 'preEdit', function ( $editor, $id, $values ) {
      $db = $editor->db();
    
      ...
    } )
    

    Full reference for the server-side libraries API is available here.

    Allan

This discussion has been closed.