From efdce4e4bbf4dee44e78482ef20fb2023509d335 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 3 Apr 2023 16:05:33 +1200 Subject: [PATCH] Use label, where present Label is preferred over title - when the metadata comes from the DAO it is in html['label'], but if it comes from apiv4 it seems it is mapped higher up... --- CRM/Import/Form/MapField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Import/Form/MapField.php b/CRM/Import/Form/MapField.php index f3eea0aff8..0ddea9ae84 100644 --- a/CRM/Import/Form/MapField.php +++ b/CRM/Import/Form/MapField.php @@ -457,7 +457,7 @@ abstract class CRM_Import_Form_MapField extends CRM_Import_Forms { continue; } $childField = [ - 'text' => $field['html']['label'] ?? $field['title'], + 'text' => $field['label'] ?? ($field['html']['label'] ?? $field['title']), 'id' => $fieldName, 'has_location' => !empty($field['hasLocationType']), 'default_value' => $field['default_value'] ?? '', -- 2.25.1