submit( )


Submits a Wix Form.

The submit() function does the following:

  1. Performs built-in, general validations (such as checking that all email fields contain valid email addresses).
  2. Calls onSubmit(). If the form fields do not pass validation, the submit() function returns the SUBMISSION_ERROR.VALIDATION_FAILED error and the submission of the Wix Form data to the server is aborted.
  3. Sends a request to the server to create a submission.
    If the request is successful:
    1. Calls onSubmitSuccess().
    2. Resets form field values.
    3. The submit() function returns an object with the submitted values. If the request fails:
    4. Calls onSubmitFailure().
    5. The submit() function returns an error.
Method Declaration
Copy
Request
This method does not take any parameters
Returns
Return Type:Promise<FormValues>
Was this helpful?
Yes
No