diff --git a/modules/backend/formwidgets/RecordFinder.php b/modules/backend/formwidgets/RecordFinder.php index 982e12dc01..81051f136a 100644 --- a/modules/backend/formwidgets/RecordFinder.php +++ b/modules/backend/formwidgets/RecordFinder.php @@ -290,7 +290,12 @@ public function getDescriptionValue() return null; } - return $this->relationModel->{$this->descriptionFrom}; + // Convert array-like notation to dot notation + if (preg_match('/\[(.*?)\]/', $this->relationModel, $matches)) { + $this->descriptionFrom = str_replace(['[', ']'], ['.', ''], $this->descriptionFrom); + } + + return data_get($this->relationModel, $this->descriptionFrom); } public function onFindRecord()