ERPNext Foundation ERPNext Cloud Chat Blog Discuss Frappé* Donate

Render Html Template


#1

hello everyone
I want to render an address doctype inside a custom doctype i created (Insurance Company) through the html field, i’d like it to be similar to the way address are posted on the customer doctype,
i have gone through https://discuss.erpnext.com/t/bring-data-into-html-field-in-the-doctype/14194
and i still have not been able to achieve what i want, i would really appreciate if someone can show me where i am wrong
template

s1

js


#2

I have figured something out,
regards


#3

Hii, render template syntax should be like this:

var table_data = frappe.render_template("your html template name",{"parameter name":parameter value});
		 		   		$(frm.fields_dict["your html field name"].wrapper).html(table_data);
		 		   		refresh_field("your html field name");

#4