Skip to content

Commit

Permalink
Add all global sets into variable-enabled fields
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Dec 21, 2020
1 parent 42416f7 commit f456efc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/helpers/Variables.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit f456efc

Please sign in to comment.