onWixFormSubmittedError( )
Adds an event handler that runs when a site visitor is not able to successfully submit a Wix Form to the server.
Description
If a Wix Form has not been successfully submitted by the site visitor, the received
WixFormSubmittedErrorEvent
object
contains error information about why the Wix Form could not be submitted.
The WixFormSubmittedErrorEvent
object is returned by the callback asynchronously right after
an unsuccessful submission.
The onWixFormSubmittedError
error handler runs for for the WixForms
element. The callback to
run when a submission error occurs is either the name of the function or a function expression.
Error Codes and Descriptions
- INVALID_FIELD. A field value was not entered correctly by the site visitor.
- FILE_NOT_UPLOADED. A file or signature upload did not succeed.
- INVALID_ARGUMENT. An internal server error occurred.
- UNAUTHENTICATED. The site member's or visitor's identity was not authenticated.
- PERMISSION_DENIED. The site visitor does not have permissions to submit the Wix Form. For example, a reCAPTCHA challenge was not verified.
- RESOURCE_EXHAUSTED. The request to submit the Wix Form was denied by the server to prevent overload and improve overall performance.
- UNAVAILABLE. The service is not available.
- UNKNOWN_ERROR. An unknown error occurred.
For other Wix Forms events, see:
- The
onWixFormSubmit()
event handler, which sets events that fire when a site visitor submits a Wix Form yet before it is sent to the server. - The
onWixFormSubmitted()
event handler, which sets events that fire when a site visitor submits a Wix Form and it is successfully received by the server. - The
onFormSubmit()
event handler, which is called in the Backend section's code, to set events that fire on the backend when a site visitor submits a form. *
Syntax
function onWixFormSubmittedError(eventHandler: WixFormSubmittedErrorEventHandler): voideventHandler: function WixFormSubmittedErrorEventHandler(errorEvent: $w-wixformsubmittederrorevent-(old-forms-app)): void
onWixFormSubmittedError Parameters
NAME
TYPE
DESCRIPTION
The name of the function or the function expression to run when a Wix Form is not submitted due to error.
Returns
This function does not return anything.
Return Type:
WixFormSubmittedErrorEventHandler Parameters
NAME
TYPE
DESCRIPTION
Returns
This function does not return anything.
Return Type:
Related Content:
Was this helpful?
An event that is fired on a WixForms element when the Wix Form is not submitted successfully
1$w("#myWixForms").onWixFormSubmittedError(2 ( {code, message} ) => {3 $w("#errorCodeText").text = code;4 $w("#errorMessageText").text = message;5 });