Search.../

confirmSubmission( )

Developer Preview

Confirms a submission.

Description

You can only confirm a submission that has a PENDING status. The default status when a submission is created is CONFIRMED. You can change the default status for individual submissions using the createSubmission() or updateSubmission() methods.

This function is not a universal function and runs only on the backend.

Admin Method

This function requires elevated permissions to run. This function is not universal and runs only on the backend.

Syntax

function confirmSubmission(submissionId: string): Promise<ConfirmSubmissionResponse>

confirmSubmission Parameters

NAME
TYPE
DESCRIPTION
submissionId
string

Submission ID to confirm.

Returns

Return Type:

Promise<
ConfirmSubmissionResponse
>
NAME
TYPE
DESCRIPTION
submission
FormSubmission

The confirmed submission.

Was this helpful?

confirmSubmission example

Copy Code
1import { submissions } from 'wix-forms.v2';
2
3 async function confirmSubmission(submissionId) {
4 try {
5 const result = await submissions.confirmSubmission(submissionId);
6
7 return result;
8 } catch (error) {
9 console.error(error);
10 // Handle the error
11 }
12 }
13