diff --git a/src/@episerver/forms-react/src/components/elements/ParagraphTextElementBlock.tsx b/src/@episerver/forms-react/src/components/elements/ParagraphTextElementBlock.tsx index 4ec6057..15746bb 100644 --- a/src/@episerver/forms-react/src/components/elements/ParagraphTextElementBlock.tsx +++ b/src/@episerver/forms-react/src/components/elements/ParagraphTextElementBlock.tsx @@ -1,4 +1,4 @@ -import { FormContainer, ParagraphText, getStringValue } from "@episerver/forms-sdk" +import { FormContainer, FormStorage, ParagraphText, getStringValue } from "@episerver/forms-sdk" import React, { useMemo } from "react"; import ElementWrapper from "./shared/ElementWrapper"; import { useElement } from "../../hooks/useElement"; @@ -16,8 +16,9 @@ export const ParagraphTextElementBlock = (props: ParagraphTextElementBlockProps) const formContext = useForms(); const form = formContext?.formContainer as FormContainer const formKey = form.key; + const formStorage = new FormStorage(form); - const data = formContext?.formSubmissions ?? [] + const data = formStorage.loadFormDataFromStorage() ?? formContext?.formSubmissions ?? [] const doReplaceText = element.properties.disablePlaceholdersReplacement ?? true diff --git a/src/@episerver/forms-sdk/src/helpers/buildConfirmationMessage.ts b/src/@episerver/forms-sdk/src/helpers/buildConfirmationMessage.ts index 4a81585..344a3f5 100644 --- a/src/@episerver/forms-sdk/src/helpers/buildConfirmationMessage.ts +++ b/src/@episerver/forms-sdk/src/helpers/buildConfirmationMessage.ts @@ -22,8 +22,7 @@ export function getStringValue(element: FormSubmission) { const fileList = value let fileNames = "" for (let i = 0; i < fileList.length; i++) { - const file = fileList[i].file - fileNames += `${file.name}` + fileNames += `${fileList[i].name}` if (fileList.length > 0) { fileNames += " | " }