This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Note: The Form Submission API only works with the Wix Forms app. Call GetAppInstance to confirm that the app named wix_forms
is installed on the site.
Counts the number of submissions belonging to forms that were filtered and contain a provided expression.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
function countSubmissionsByFilter(
filter: Record<string, any>,
options: CountSubmissionsByFilterOptions,
): Promise<CountSubmissionsByFilterResponse>;
A filter object. Must filter by namespace.
import { submissions } from "wix-forms.v2";
async function countSubmissionsByFilter(filter, options) {
try {
const result = await submissions.countSubmissionsByFilter(filter, options);
return result;
} catch (error) {
console.error(error);
// Handle the error
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.