> 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: onFormSubmit(event: FormSubmitEvent) # Method package: wixCrmBackend # Method menu location: wixCrmBackend --> Events --> onFormSubmit # Method Link: https://dev.wix.com/docs/velo/apis/wix-crm-backend/events/on-form-submit.md # Method Description: An event that triggers when a site visitor submits a Wix Form. The `onFormSubmit()` event handler runs when a site visitor submits a Wix Form (see the [`WixForms`](https://dev.wix.com/docs/velo/api-reference/$w/form/introduction.md) `$w` element). The received `FormSubmitEvent` object contains information about the Wix Form that was submitted. > **Note:** Backend events don't work when previewing your site. For Wix Forms client side events, see: + The [`onWixFormSubmit()`](https://dev.wix.com/docs/velo/api-reference/$w/wix-forms/on-wix-form-submit.md) function, which sets events that fire when a site visitor submits a Wix Form yet before it is sent to the server. + The [`onWixFormSubmitted()`](https://dev.wix.com/docs/velo/api-reference/$w/wix-forms/on-wix-form-submitted.md) function, which sets events that fire when a site visitor submits a Wix Form and it is successfully received by the server. + The [`onWixFormSubmittedError()`](https://dev.wix.com/docs/velo/api-reference/$w/wix-forms/on-wix-form-submitted-error.md) function, which sets events that fire when a site visitor submits a Wix Form and it is successfully received by the server. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## An event when a Wix Form is submitted ```javascript // Place this code in the events.js file // of your site's Backend section. export function wixCrm_onFormSubmit(event) { let formName = event.formName; } /* Full event object: * { * "contactId": "f2cb00b5-9286-4d35-b41b-367d6fec43ce", * "formName": "Feedback Form", * "submissionTime": "2019-03-24T12:58:20.617Z", * "submissionData": [ * { * "fieldName": "First Name", * "fieldValue": "John" * }, * { * "fieldName": "Last Name", * "fieldValue": "Doe" * }, * { * "fieldName": "Email", * "fieldValue": "john.doe@somedomain.com" * } * ], * "attachments": [ * { * "name": "flowers.jpg", * "type": "IMAGE", * "url": "wix:image://v1/68d3a9_1de7529c444b4c9eb38401f8efe0cad2.jpg/flowers.jpg#originWidth=1970&originHeight=112" * }, * { * "name": "SampleVideo_1280x720_10mb.mp4", * "type": "VIDEO", * "url": "wix:video://v1/80c05f_be1c421575e34915ad257571c4055ee4/SampleVideo_1280x720_10mb.mp4" * } * ] * } */ ``` ---