How to change formOptions after initialize

How to change formOptions after initialize

we0038we0038 Posts: 22Questions: 8Answers: 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: 22Questions: 8Answers: 1
    edited July 21

    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();
            }
          }
        },
    
Sign In or Register to comment.