Keep editor open after submit.

Keep editor open after submit.

INTONEINTONE Posts: 153Questions: 58Answers: 6
edited July 2016 in Editor

I am trying to keep the editor open after a create submit and force the form to a edit state. I tried:

editor.on( 'postCreate', function ( e,json,data ) {
        editorID = data.DT_RowId;
    }).on( 'preClose',function(e){
        return false;
            editor
            .title('<h3>Case Details</h3>')
            .buttons("Update")
            .edit(editorID);
        
    } ); 

but this does not work. Is there a way to do this?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin
    Answer ✓

    If you return false before you execute any other code, then its not going to be able to execute the other code. I guess the obvious thing with the above code would be to move line 4 to line 9.

    Allan

  • INTONEINTONE Posts: 153Questions: 58Answers: 6

    Stupid me, that is so obvious! Thanks Allan.

This discussion has been closed.