Autofill custom module issues

Autofill custom module issues

Hello, I want to set up a function that populates fields in a custom module called Leases with data from another module. Leases has a lookup field called Contact which connects to the Contacts module. We would like to have a function that pulls the email, phone and industry data from the associated Contact into the fields in the Leases module of the same names. I have set up similar functions in the past, to autopopulate Contacts with data from their associated Accounts, but the functions have failed to adapt. I think this is probably related to the fact that the Leases field is a custom one. Thank you for your time