diff --git a/src/MadeYourDay/Contao/CustomElements.php b/src/MadeYourDay/Contao/CustomElements.php index 7a8e3a9..91ae274 100644 --- a/src/MadeYourDay/Contao/CustomElements.php +++ b/src/MadeYourDay/Contao/CustomElements.php @@ -137,6 +137,10 @@ public function loadCallback($value, $dc) { $value = $this->getNestedValue($dc->field); + if ($value === null && isset($GLOBALS['TL_DCA'][$dc->table]['fields'][$dc->field]['default'])) { + $value = $GLOBALS['TL_DCA'][$dc->table]['fields'][$dc->field]['default']; + } + if ( version_compare(VERSION, '3.2', '>=') && $GLOBALS['TL_DCA'][$dc->table]['fields'][$dc->field]['inputType'] === 'fileTree' &&