From f456efc41776376d546a99cc5756c9e555e73b35 Mon Sep 17 00:00:00 2001 From: Josh Crawford Date: Tue, 22 Dec 2020 09:27:49 +1100 Subject: [PATCH] Add all global sets into variable-enabled fields --- src/helpers/Variables.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/helpers/Variables.php b/src/helpers/Variables.php index c72fb1bc6..c47ff7798 100644 --- a/src/helpers/Variables.php +++ b/src/helpers/Variables.php @@ -226,6 +226,11 @@ public static function getParsedValue($value, Submission $submission = null, For // Properly parse field values $extras = array_merge($extras, self::_getParsedFieldValues($form, $submission)); + // Add support for all global sets + foreach (Craft::$app->getGlobals()->getAllSets() as $globalSet) { + $extras[$globalSet->handle] = $globalSet; + } + self::$extras[$cacheKey] = $extras; }