formData


formDataFormDataRead-only

Gets information about the event's registration form and status.

The returned FormData object contains the information you need to create a custom registration form for the specified event.

This information includes:

  • The event's registration status, such as whether registration is open, closed, or guests will be placed on a waitlist.
  • Which statuses guests can RSVP with, such as yes, no, or to be added to the waitlist.
  • Whether the event is a ticketed event.
  • Information about the registration form's fields, such as their names, descriptive labels, and whether they are required.

Note: To work with the Wix Events API, you need to publish your site.

JavaScript
import wixEventsFrontend from "wix-events-frontend"; // ... const eventId = // Get the event ID wixEventsFrontend.getForm(eventId).then((form) => { let formData = form.formData; let fields = formData.formInputs; let firstFieldName = fields[0].name; let statusOptions = formData.rsvpStatusOptions; let registrationStatus = formData.registrationStatus; let isTicketed = formData.isTicketed; }); /* formData: * * { * "rsvpStatusOptions": "YES_AND_NO, * "registrationStatus": "OPEN_RSVP", * "isTicketed": false, * "formInputs": [ * { * "_id": "37a5789b-27d1-43a3-703b-a93dedad5b01", * "additionalLabels": [], * "array": false, * "controlType": "NAME", * "label": "First Name", * "required": true, * "maxLength": 50, * "name": "firstName", * "options": [] * }, * * ... * * { * "_id": "27d5789b-137a-43ed-a33d-a9703bad5b01", * "additionalLabels": [ * { * "name": "one", * "label": "I'm bringing a plus one" * }, * { * "name": "multiple", * "label": "Additional Guests" * } * ], * "array": false, * "controlType": "GUEST_CONTROL", * "label": "I'm bringing a plus one", * "required": true, * "maxLength": 0, * "name": "additionalGuests", * "options": [ * "0", * "1" * ] * } * ] * } */
Did this help?