How to hide a field using "depends on" or through custom script?

I am trying to permanently hide a read only field. I tried to hide using the “depends on”. I ve also tried to hide the field using custom javascript but nothing worked.

refresh: function(frm) {
		frm.toggle_display("field_name", true);

That’s odd …it should be hidden by checking hidden on field props.

Depends on hide or show depending on Eval function.

Did u reload after saving?

Yeah i did. When i’m checking the “Customize Form” and “Setup–> Doctype” then the field which i want to hide is there in the customize form but i couldn’t find the field in Setup–> Doctype.

Try on Setup → Custom Field and check hidden field in the corresponding field