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