Form Submission Service Plugin: Sample Use Cases & Flows
This article presents sample flows your app can support. You aren't limited to this exact flow, but it can be a helpful jumping off point as you plan your Submissions service plugin integration.
Validate an email field
-
A site visitor enters an email address into a form field and submits the form.
-
Wix sends a Validate Submission service plugin request to your app.
-
Your server validates the request. The email isn't valid, and the server sends an object containing the error.
Example of a violation response from your app:
Copy1 -
The email field is highlighted on the form, notifying the site visitor that the email is invalid.
-
After this validation, the site visitor corrects the email and submits the form.
-
Again Wix sends a Validate Submission service plugin request to your app.
-
Your server validates the request. The email is valid and the server sends an object containing an empty list.
Prevent duplicate submissions
-
A site visitor submits the same form again, which is permitted.
-
Wix sends a Validate Submission service plugin request to your app.
-
Your server checks for a unique submission token and validates the request. The server finds the duplicate and returns an object containing error.
Example of a violations response from your app:
Copy1 -
With this validation violation, the site visitor can't submit this form again.