dev/core#715 - Fix delete action on RelationshipType form
[civicrm-core.git] / CRM / Core / Form / EntityFormTrait.php
index 102393d4b569762bb2de0642910f4248b382159b..6693f88dfafe341bf3554f854c0edf7c5d6240d8 100644 (file)
@@ -250,6 +250,10 @@ trait CRM_Core_Form_EntityFormTrait {
         // We can't load this field using metadata
         continue;
       }
+      if ($field != 'id' && $this->isDeleteContext()) {
+        // Delete forms don't generally present any fields to edit
+        continue;
+      }
       // Resolve action.
       if (empty($props['action'])) {
         $props['action'] = $this->getApiAction();