> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: countSubmissionsByFilter(filter: Record, options: CountSubmissionsByFilterOptions) # Method package: wixFormsV2 # Method menu location: wixFormsV2 --> submissions --> countSubmissionsByFilter # Method Link: https://dev.wix.com/docs/velo/apis/wix-forms-v2/submissions/count-submissions-by-filter.md # Method Description: > **Note:** The Form Submission API only works with the Wix Forms app. Call [GetAppInstance](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/get-app-instance.md) 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. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## countSubmissionsByFilter example for dashboard page code ```javascript 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 } } ``` ## countSubmissionsByFilter example for exporting from backend code ```javascript import { submissions } from 'wix-forms.v2'; import { webMethod, Permissions } from 'wix-web-module'; import { elevate } from 'wix-auth'; const elevatedCountSubmissionsByFilter = elevate(submissions.countSubmissionsByFilter); export const countSubmissionsByFilter = webMethod( Permissions.Anyone, async (filter, options) => { try { const result = await elevatedCountSubmissionsByFilter(filter, options); return result; } catch (error) { console.error(error); // Handle the error } } ); ``` ---