How to change formOptions after initialize

How to change formOptions after initialize

we0038we0038 Posts: 39Questions: 13Answers: 1

I want to change the editor formOptions main.onBackground to none or blur depending on logic after initializing. Is this supposed?

Answers

  • we0038we0038 Posts: 39Questions: 13Answers: 1
    edited July 2019

    Never mind, it just couldn't find an example. I found out a way:

    editor = new $.fn.dataTable.Editor( {
        formOptions: {
          main: {
            onBackground: function(editor, el){
              if(  MY_LOGIC )
                return false;
              else
                editor.close();
            }
          }
        },
    
This discussion has been closed.