Merge pull request #24059 from eileenmcnaughton/pledged
[civicrm-core.git] / CRM / Core / Form / EntityFormTrait.php
index d807c58527364718bc985c3e40ad2ad41648b8ea..ccf5522788446357b8b28da2f4759aef602f5180 100644 (file)
@@ -137,6 +137,16 @@ trait CRM_Core_Form_EntityFormTrait {
     }
     $this->applyFilter('__ALL__', 'trim');
     $this->addEntityFieldsToTemplate();
+    foreach ($this->entityFields as $index => $fields) {
+      $this->entityFields[$index] = array_merge([
+        'template' => '',
+        'help' => [],
+        'pre_html_text' => '',
+        'post_html_text' => '',
+        'description' => '',
+        'documentation_link' => '',
+      ], $fields);
+    }
     $this->assign('entityFields', $this->entityFields);
     $this->assign('entityID', $this->getEntityId());
     $this->assign('entityInClassFormat', strtolower(str_replace('_', '-', $this->getDefaultEntity())));