Search.../

countSubmissions( )

Developer Preview

Counts the number of submissions belonging to the specified forms.

Admin Method

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

Syntax

function countSubmissions(formIds: Array<string>, namespace: string): Promise<CountSubmissionsResponse>

countSubmissions Parameters

NAME
TYPE
DESCRIPTION
formIds
Array<
string
>

Form IDs.

namespace
string

Identifies the app which the form submissions belong to. For example, the namespace for the Wix Forms App is "wix.form_app.form". The namespace of a submission can be retrieved using the Get Submission endpoint.

Returns

Return Type:

Promise<
CountSubmissionsResponse
>
NAME
TYPE
DESCRIPTION
formsSubmissionsCount
Array<
FormSubmissionsCount
>

Forms submission count.

Was this helpful?

countSubmissions example

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