Fixes for setting defaults for custom data field of type file
authorKurund Jalmi <kurund.jalmi@gmail.com>
Fri, 25 Aug 2023 09:22:38 +0000 (10:22 +0100)
committerKurund Jalmi <kurundjalmi@thirdsectordesign.org>
Mon, 4 Sep 2023 14:36:24 +0000 (15:36 +0100)
CRM/Core/BAO/CustomGroup.php

index 2673214a863db7cd3f785fd594680516d5f0f71a..e7b561a07c8dfc6bbed2fab2c67dfe17b96aaf62 100644 (file)
@@ -1796,7 +1796,7 @@ ORDER BY civicrm_custom_group.weight,
         if ($value !== NULL) {
           $formValues[$properties['element_name']] = $value;
         }
-        elseif (isset($submittedValues[$properties['element_name']])) {
+        elseif (isset($submittedValues[$properties['element_name']]) && $properties['data_type'] !== 'File') {
           $properties['element_value'] = $submittedValues[$properties['element_name']];
         }
         unset($properties['customValue']);