We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed45f9f commit 408767dCopy full SHA for 408767d
1 file changed
src/Forms/Form.php
@@ -17,6 +17,7 @@
17
use Statamic\Events\FormDeleting;
18
use Statamic\Events\FormSaved;
19
use Statamic\Events\FormSaving;
20
+use Statamic\Facades\Antlers;
21
use Statamic\Facades\Blueprint;
22
use Statamic\Facades\File;
23
use Statamic\Facades\Form as FormFacade;
@@ -268,6 +269,12 @@ public function delete()
268
269
public function hydrate()
270
{
271
$contents = YAML::parse(File::get($this->path()));
272
+ $variables = ['config' => config()->all()];
273
+ array_walk_recursive($contents, function (&$value) use ($variables) {
274
+ if (is_string($value)) {
275
+ $value = (string) Antlers::parse($value, $variables);
276
+ }
277
+ });
278
279
$methods = [
280
'title',
0 commit comments