Introduction

The Submissions API allows you to create and manage the submissions made on a form.

With the Submissions API, you can:

  • Query and manage a submission.
  • Retrieve the total number of submissions per form.
  • Confirm a submission or mark submissions as seen.
  • Retrieve a media upload file URL to use in a submission for forms that include a field for uploading files.

Submission lifecycle

When submitting a form:

  1. Call the createSubmission() function and pass the form field values of a particular form.
  2. createSubmission() forwards the form field values to the server.
  3. The server proceeds to validate the submission: If the validation is successful:
    1. createSubmission() submits the form.
    2. Records the submission into the WixForms collection.
      If the validation fails:
    3. The server throws an error, which is then passed to the API.
    4. The submission process is aborted.

Before you begin

It’s important to note the following points before starting to code:

  • There are several apps that use forms:
    • Wix Forms: site visitors can submit their contact information to send message to a company, or to subscribe to a newsletter.
    • Wix Pricing Plans: forms can be used for online orders, site visitors can submit their contact info and address during the checkout.
    • Wix Online Programs: forms can be used as quizzes.
  • You must first have a form on your site in order to manage Submissions.
  • To use the Submissions API, import { submissions } from the wix-forms.v2 module.
Copy

Terminology

  • Submission: Data received when a form is submitted by a site visitor.
  • Submissions Table: A table in the dashboard that records submissions to a form.
  • Media Upload URL: A URL used to upload a file to a form.
Was this helpful?
Yes
No