Submit Button Enabled After Form Get Refreshed

I Used $('.primary-action').prop('disabled', true); for Disable My Submit Button
it worked well But When Form Get Refreshed Submit Button Get Enabled Again that Should not Happen
Any Solution for This?

Hi @Riddhi_Solanki,

are you try it like the below code?

frappe.ui.form.on('Your DocType', {
	refresh: function(frm) {
		$('.primary-action').prop('disabled', true); 
	}
});