onFormSubmit( )


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 $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() function, which sets events that fire when a site visitor submits a Wix Form yet before it is sent to the server.
  • The onWixFormSubmitted() function, which sets events that fire when a site visitor submits a Wix Form and it is successfully received by the server.
  • The onWixFormSubmittedError() function, which sets events that fire when a site visitor submits a Wix Form and it is successfully received by the server.
Method Declaration
Copy
Method Parameters
eventFormSubmitEventRequired

The Wix Form data.

Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?