Search.../

createSubmission( )

Developer Preview

Creates a new submission.

Syntax

function createSubmission(submission: FormSubmission, options: CreateSubmissionOptions): Promise<CreateSubmissionResponse>

createSubmission Parameters

NAME
TYPE
DESCRIPTION
submission
FormSubmission

Submission to create.

options
Optional
CreateSubmissionOptions

Returns

Return Type:

Promise<
CreateSubmissionResponse
>
NAME
TYPE
DESCRIPTION
submission
FormSubmission

The created submission.

Was this helpful?

createSubmission example

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