Render address and contacts always

In Lead form, new address and new contact create button will show only after save. I checked the code and I think this is the reason

		if (!this.frm.is_new()) {
			frappe.contacts.render_address_and_contact(this.frm);
		} else {
			frappe.contacts.clear_address_and_contact(this.frm);
		}

Now, I want to show these two button, address and contact to show always. How to override this?

Address is linked to Lead by using the Lead document’s name/ID.
So before you save the document, there is no name/ID for that document.

And hence even if you create an address, it won’t be linked to the Lead.

1 Like