diff --git a/src/@episerver/forms-react/src/components/FormBody.tsx b/src/@episerver/forms-react/src/components/FormBody.tsx index 617f222..f5f1b8b 100644 --- a/src/@episerver/forms-react/src/components/FormBody.tsx +++ b/src/@episerver/forms-react/src/components/FormBody.tsx @@ -114,7 +114,8 @@ export const FormBody = (props: FormBodyProps) => { partialSubmissionKey: localFormCache.get(FormConstants.FormSubmissionId + form.key) ?? "", hostedPageUrl: window.location.pathname, submissionData: formSubmissions, - accessToken: formContext?.identityInfo?.accessToken + accessToken: formContext?.identityInfo?.accessToken, + currentStepIndex: currentStepIndex } dispatchFunctions.updateIsSubmitting(true); diff --git a/src/@episerver/forms-sdk/src/form-submit/formSubmit.ts b/src/@episerver/forms-sdk/src/form-submit/formSubmit.ts index 732a99f..7489221 100644 --- a/src/@episerver/forms-sdk/src/form-submit/formSubmit.ts +++ b/src/@episerver/forms-sdk/src/form-submit/formSubmit.ts @@ -33,6 +33,10 @@ export interface FormSubmitModel { * The access token to identify login user */ accessToken?: string; + /** + * The current index of submitted step + */ + currentStepIndex: number; } export interface FormSubmitResult { @@ -99,6 +103,7 @@ export class FormSubmitter { formData.append("IsFinalized", model.isFinalized.toString()); formData.append("PartialSubmissionKey", model.partialSubmissionKey); formData.append("HostedPageUrl", model.hostedPageUrl); + formData.append("CurrentStep", model.currentStepIndex.toString()); //append form submission to FormData object model.submissionData.forEach(data => {