Print format customer address as blank

Hi,

I am doing a print format with custom HTML for flexibility.

I added a Custom Script.

frappe.ui.form.on(“Print Format”, {
onload: function(frm) {
var address_none="";
if(frm.doc.customer_address=“None”) {
frm.doc.customer_address=address_none;
}
});

However, the address still shows “None”. I would like to make it nothing appears.

Hi @mulyadi-agtechsg,

try:

{{doc.customer_name}}
{% if doc.contact_display %} {{doc.contact_display}} {%- endif -%}
{% if doc.address_display %} {{doc.address_display}} {%- endif -%}

Hi @spa marvellous!

I put this inside Custom HTML of custom format.

Thank you very much! Appreciate it!

pleasure