diff --git a/frappe/printing/doctype/print_format/print_format.js b/frappe/printing/doctype/print_format/print_format.js index 3d2397c111..1b15d44f15 100644 --- a/frappe/printing/doctype/print_format/print_format.js +++ b/frappe/printing/doctype/print_format/print_format.js @@ -37,8 +37,6 @@ frappe.ui.form.on("Print Format", { frappe.set_route("print-format-builder", frm.doc.name); } }); - } else if (frm.doc.custom_format && !frm.doc.raw_printing) { - frm.set_df_property("html", "reqd", 1); } if (frappe.model.can_write("Customize Form")) { frappe.model.with_doctype(frm.doc.doc_type, function () { diff --git a/frappe/printing/doctype/print_format/print_format.json b/frappe/printing/doctype/print_format/print_format.json index 2a7b3c0215..fa4b9313d3 100644 --- a/frappe/printing/doctype/print_format/print_format.json +++ b/frappe/printing/doctype/print_format/print_format.json @@ -117,6 +117,7 @@ "fieldname": "html", "fieldtype": "Code", "label": "HTML", + "mandatory_depends_on": "eval: doc.custom_format", "oldfieldname": "html", "oldfieldtype": "Text Editor", "options": "Jinja" @@ -127,6 +128,7 @@ "fieldname": "raw_commands", "fieldtype": "Code", "label": "Raw Commands", + "mandatory_depends_on": "raw_printing", "options": "Jinja" }, { @@ -292,7 +294,7 @@ "icon": "fa fa-print", "idx": 1, "links": [], - "modified": "2025-09-23 10:39:51.123539", + "modified": "2026-02-11 13:17:55.662780", "modified_by": "Administrator", "module": "Printing", "name": "Print Format",