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 85e0146 commit 765c2dfCopy full SHA for 765c2df
1 file changed
runner/src/server/plugins/engine/components/Details.ts
@@ -1,5 +1,7 @@
1
import { FormData, FormSubmissionErrors } from "../types";
2
import { ComponentBase } from "./ComponentBase";
3
+import config from "../../../config";
4
+import nunjucks from "nunjucks";
5
6
export class Details extends ComponentBase {
7
getViewModel(formData: FormData, errors: FormSubmissionErrors) {
@@ -11,6 +13,10 @@ export class Details extends ComponentBase {
11
13
html: this.content,
12
14
};
15
16
+ if (config.allowUserTemplates) {
17
+ viewModel.html = nunjucks.renderString(viewModel.html, { ...formData });
18
+ }
19
+
20
if ("condition" in options && options.condition) {
21
viewModel.condition = options.condition;
22
}
0 commit comments