Reflect data pulled as HTML

Currently I am working on this Bank Information feature which have to be pulled into Customer doctype. Only bank information tagged to this Customer should be shown. This should look somewhat like how address is reflected in Lead doctype

A further look into Lead doctype shows that the address section is classified as HTML (shown below)

I have explored the backend and found that it uses frappe.render_template method to pull in data and reflect as shown above. After multiple attempts to replicate this, I am still unable to solve this.

Can anyone point me in the right direction?

Thank you so much! :slight_smile: