Fixed auto populate of contact refrence field on membership signup form
authorPradeep Nayak <pradpnayak@gmail.com>
Wed, 17 Apr 2019 13:12:37 +0000 (14:12 +0100)
committerPradeep Nayak <pradpnayak@gmail.com>
Wed, 17 Apr 2019 13:12:37 +0000 (14:12 +0100)
CRM/Core/BAO/CustomField.php

index 71e597832d062bcb3f17654d6419551eaab1c0b4..6dd3d5b208c345ae3cc4fba20c2228a32354aaa0 100644 (file)
@@ -1421,18 +1421,6 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
         }
         break;
 
-      case 'Autocomplete-Select':
-        if ($customField->data_type == 'ContactReference') {
-          if (is_numeric($value)) {
-            $defaults[$elementName . '_id'] = $value;
-            $defaults[$elementName] = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $value, 'sort_name');
-          }
-        }
-        else {
-          $defaults[$elementName] = $value;
-        }
-        break;
-
       default:
         $defaults[$elementName] = $value;
     }