Skip to content

Commit

Permalink
Merge branch '6.2' into 6
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jun 26, 2024
2 parents 6a9c1f1 + f2cda50 commit fce2342
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions code/Model/Recipient/UserFormRecipientItemRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use SilverStripe\UserForms\Model\EditableFormField\EditableFormHeading;
use SilverStripe\UserForms\Model\EditableFormField\EditableLiteralField;
use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;
use SilverStripe\View\SSViewer;

/**
Expand All @@ -34,14 +35,18 @@ public function preview()
Config::nest();
Config::modify()->set(SSViewer::class, 'theme_enabled', true);

Requirements::clear();

$content = $this->customise([
'Body' => $this->record->getEmailBodyContent(),
'HideFormData' => (bool) $this->record->HideFormData,
'Fields' => $this->getPreviewFieldData()
])->renderWith($this->record->EmailTemplate);

Requirements::restore();
Config::unnest();


return $content;
}

Expand Down

0 comments on commit fce2342

Please sign in to comment.