Creating a contact from partner details

Creating a contact from partner details

So I've got a custom contact page that lists the main contact details down the left and the partner details down the right. 

I want to make a script and attach it to a button that will create a new contact and map all the information from partner fields to the new contact record. 

The below script is not working for me , but if anyone can help me debug this I would greatly appreciate it

This is the script : 

contactId=input.cntId.toString()
rec = zoho.crm.create("Contacts");
resp = zoho.crm.getRelatedRecords("Contacts",cntId);
for each ele in resp
{
mp=map();
mp.put("First Name",rec.get("Partner First Name"));
mp.put("Last Name",rec.get("Partner Last Name"));
mp.put("Mobile",rec.get("Partner Mobile"));
mp.put("Email",rec.get("Partner Email"));
mp.put("Date of Birth",rec.get("Partner Date of Birth"));
mp.put("Smoker",rec.get("Partner Smoker"));
mp.put("PPS Number",rec.get("Partner PPS Number"));
mp.put("Address 1",rec.get("Partner Address 1"));
mp.put("Address 2",rec.get("Partner Address 2"));
mp.put("City",rec.get("Partner City"));
mp.put("County",rec.get("Partner County"));
mp.put("Eir Code",rec.get("Partner Eir Code"));
mp.put("Country",rec.get("Partner Country"));
contactId=ele.get("CONTACTID");
updateResp = zoho.crm.updateRecord("Contacts",contactId,mp);
}