How to disabled or make readonly field with editor.edit

How to disabled or make readonly field with editor.edit

Dika93Dika93 Posts: 3Questions: 2Answers: 0

Hello all,
I have little practice with editor.edit like in https://editor.datatables.net/examples/simple/inTableControls.html
can you explain to me how to make disabled or readonly field with editor.edit?

Thanks,

Andika

Answers

  • allanallan Posts: 50,287Questions: 1Answers: 7,475 Site admin

    You wouldn't use edit() to disable fields - use field().disable() for that.

    Allan

  • Jack TingJack Ting Posts: 2Questions: 0Answers: 0

    In your field config json, add an extra object named 'attr'
    ex.
    { name:"status", label:"Status", type:'readonly', attr:{ disabled:true } }

    this will make this field 'readonly' and 'disabled'.

Sign In or Register to comment.