Disable Checkbox thorough Client Script

Hello Developers,
How can I Check Disable Checkbox Automatically Checked When Some Condition Is True in CLient Script

Hi @Riddhi_Solanki,

Please check it.

frappe.ui.form.on('Test', {
	field_1: function(frm) {
	    if (frm.doc.field_1 == 1) {
		    frm.set_df_property("field_2", 'read_only', 1);
	    } else {
	        frm.set_df_property("field_2", 'read_only', 0);

When field_1 is 1 then field_2 will be disabled.

When field_1 is not 1 then field_2 will be enabled.

Please set yours according to condition and fields.

Thank You!

Field Is not been Enabled but it has been read_only whats The Property for enable Checkjbox

Already mention in post.