getRsvpData( )


Deprecated: Gets information about the event's RSVP form and status.

Deprecation note: The getRsvpData function of the RsvpForm object is being deprecated. Use the formData property of the Form object instead.

The getRsvpData() function returns a Promise that resolves to an RsvpData object containing all the information you need to create a custom RSVP 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.
  • Information about the RSVP 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.

Method Declaration
Copy
function getRsvpData(): Promise<RsvpData>;
Request
This method does not take any parameters
Returns
Return Type:Promise<RsvpData>
JavaScript
import wixEventsFrontend from 'wix-events-frontend'; // ... const eventId = // Get the event ID const form = wixEventsFrontend.createEventRsvpForm(eventId) form.getRsvpData() .then((rsvpData) => { let fields = rsvpData.rsvpFormInputs; let firstFieldName = fields[0].name; let statusOptions = rsvpData.rsvpStatusOptions; let registrationStatus = rsvpData.registrationStatus; }); /* rsvpData: * * { * "rsvpStatusOptions": "YES_AND_NO, * "registrationStatus": "OPEN_RSVP", * "rsvpFormInputs": [ * { * "_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" * ] * } * ] * } */
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?