protected $_dedupeFields;
+ protected static $customFields;
+
/**
* Attempt to match header labels with our mapper fields
* FIXME: This is essentially the same function as parent::defaultFromHeader
}
}
}
-
+ // retrieve and highlight required custom fields
+ $formattedFieldNames = $this->formatCustomFieldName($this->_mapperFields);
+ self::$customFields = CRM_Core_BAO_CustomField::getFields($this->_contactType);
+ foreach(self::$customFields as $key => $attr) {
+ if (!empty($attr['is_required'])) {
+ $highlightedFields[] = "custom_$key";
+ }
+ }
$this->assign('highlightedFields', $highlightedFields);
- $this->_formattedFieldNames[$contactType] = $this->_mapperFields = array_merge($this->_mapperFields, $this->formatCustomFieldName($this->_mapperFields));
+ $this->_formattedFieldNames[$contactType] = $this->_mapperFields = array_merge($this->_mapperFields, $formattedFieldNames);
$columnNames = array();
//get original col headers from csv if present.
* format custom field name.
* combine group and field name to avoid conflict.
*
+ * @param $fields
+ *
* @return void
* @access public
*/