Select2, even after disabling the field the options are selectable
Select2, even after disabling the field the options are selectable
kaustubh.agrawal2000
Posts: 88Questions: 39Answers: 2
in Plug-ins
I am using select2 plugin, although it works well, I have a use case where i should disable option select during edits.
which I am doing like:
editor.on( 'initEdit', function ( e, json, data ) {
editor.disable('commodity_id');
editor.disable('transaction_type');
});
Here, commodity_id & transaction_type are both select2 fields.. values of which are populated by AJAX.
The fields on the form are shown as GREYED OUT (like disabled).. but I am still able to select the options...
How can I disable that ?
Regards
Kaustubh
This discussion has been closed.