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: 63,482Questions: 1Answers: 10,467 Site admin

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

    Allan

  • Jack TingJack Ting Posts: 14Questions: 3Answers: 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'.

This discussion has been closed.