> 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: deleteSubmission(submissionId: string, options: DeleteSubmissionOptions) # Method package: wixFormsV2 # Method menu location: wixFormsV2 --> submissions --> deleteSubmission # Method Link: https://dev.wix.com/docs/velo/apis/wix-forms-v2/submissions/delete-submission.md # Method Description: Deletes a submission. This function moves the form submission into the trash bin. To delete the submission permanently, change the default `permanent` field value to `true.` # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Delete a submission (dashboard page code) ```javascript import { submissions } from 'wix-forms.v2'; /* Sample submissionId value: "f8281b62-1b2f-45bf-ba7d-f041d7653d2d" */ export async function myDeleteSubmissionFunction(submissionId) { try { const deletedSubmission = await submissions.deleteSubmission(submissionId); console.log('Success! Submission is deleted'); return deletedSubmission; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to void */ ``` ## Delete a submission (export from backend code) ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { submissions } from 'wix-forms.v2'; import { elevate } from 'wix-auth'; /* Sample submissionId value: "f8281b62-1b2f-45bf-ba7d-f041d7653d2d" */ export const myDeleteSubmissionFunction = webMethod(Permissions.Anyone, async (submissionId) => { try { const elevatedDeleteSubmission = elevate(submissions.deleteSubmission); const deletedSubmission = await elevatedDeleteSubmission(submissionId); console.log('Success! Submission is deleted'); return deletedSubmission; } catch (error) { console.error(error); // Handle the error } }); /* Promise resolves to void */ ``` ---