From 5bf6d78ceeb92514ded367e117d996c7f70ed45f Mon Sep 17 00:00:00 2001 From: "EP\\qang2" Date: Mon, 29 Jan 2024 15:16:36 +0700 Subject: [PATCH] Fix formSubmissionKey deleted when not finalized Fixes: AFORM-3926 --- src/@episerver/forms-react/src/components/FormBody.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/@episerver/forms-react/src/components/FormBody.tsx b/src/@episerver/forms-react/src/components/FormBody.tsx index 7edd61a..9eaad41 100644 --- a/src/@episerver/forms-react/src/components/FormBody.tsx +++ b/src/@episerver/forms-react/src/components/FormBody.tsx @@ -136,7 +136,7 @@ export const FormBody = (props: FormBodyProps) => { formSubmitter.doSubmit(model).then((response: FormSubmitResult) => { //go here, response.success always is true isSuccess.current = response.success; - isFormFinalized.current = (isProgressiveSubmit.current || isLastStep) && response.success; + isFormFinalized.current = (submitButton?.properties?.finalizeForm || isLastStep) && response.success; dispatchFunctions.updateSubmissionKey(response.submissionKey); localFormCache.set(submissionStorageKey, response.submissionKey);