CRM-16102 fix - Thows validation error on adding any 'Contact' field if the profile...
authormonishdeb <monish.deb@webaccessglobal.com>
Fri, 13 Mar 2015 08:29:35 +0000 (13:59 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Fri, 13 Mar 2015 08:29:35 +0000 (13:59 +0530)
https://issues.civicrm.org/jira/browse/CRM-16102

CRM/UF/Form/Field.php

index dec747e47182fc388a84cc6db46f10edacd9e4d5..270150e2fd3a06b077436418a5fc3acdb9042f58 100644 (file)
@@ -652,7 +652,7 @@ class CRM_UF_Form_Field extends CRM_Core_Form {
         if (!is_array($basicType)) {
           $basicType = array($basicType);
         }
-        if (!in_array($fieldType, $basicType)) {
+        if (!in_array($fieldType, $basicType) && $fieldType != 'Contact') {
           $errors['field_name'] = ts('Cannot add or update profile field type "%1" with combination of subtype other than "%1".',
             array(1 => $fieldType)
           );