Table Multiselect readonly

A field where defined as Table Multi select can not be set as readonly in client script … it disapears like hidden true…

is there any idea how i can set it readonly ?

Try the following in your client script

frappe.ui.form.on('YOUR_DOCTYPE', {
	refresh(frm) {
		frm.fields_dict.FIELD_NAME.$input.prop('disabled', true);

Replace doctype and field name with your case.

1 Like

i have tried this… but it act strange… another subtable is hidden after setting this code and the field i want to set disabled is writable again

when i use following code it disapears completly:
frm.set_df_property(‘auswahl_bodyparts’, ‘disabled’,1);

Please try it.

cur_frm.set_df_property('fieldname', 'read_only', 1);

Thank You!