Skip to content

Commit

Permalink
Merge pull request #106 from episerver/bugfix/AFORM-3942-Richtext-Dis…
Browse files Browse the repository at this point in the history
  • Loading branch information
epi-qang2 authored Feb 6, 2024
2 parents 0277e1d + 8f40ef5 commit 1abe564
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 += " | "
}
Expand Down

0 comments on commit 1abe564

Please sign in to comment.