submit( )


Deprecated: Submits an RSVP form and adds the new guests to the event's guest list.

Deprecation note: The submit() function of the RsvpForm object is being deprecated. Use the createRsvp() function of the Rsvp object instead.

The submit() function returns a Promise that resolves to an RsvpResponse when the guests in the specified form values have been added to the event's guest list.

The list of FormValue objects you pass to submit() must include a form value for the rsvpStatus. Which statuses you can return depends on the rsvpStatusOptions returned from the getRsvpData() function as follows:

  • "YES_AND_NO": Send an rsvpStatus of "YES" or "NO".
  • "YES_ONLY": Send an rsvpStatus of "YES".
  • "OPEN_RSVP_WAITLIST": Send an rsvpStatus of "WAITING" to add a guest to the waitlist.

When submitting an RSVP form with rsvpStatus of "WAITING" or "NO", the list of FormValue objects should only contain items for "firstName", "lastName", "email", and "rsvpStatus". No other fields should be passed.

When a form contains an input for adding more guests to an RSVP, format the guest names for submission in an array where each element is the full name of a guest.

When a form contains an address, the way you format the address information for submission depends on what type of input elements you use to gather that information as follows:

  • If the address is input using a Wix address input element, no special formatting is needed.
  • If the address is input using another type of input element, such as a text input, format the input's value in an array.
  • If the address is input using a number of input elements, each for a different part of the address, format the input values as elements in an array.

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

Method Declaration
Copy
Method Parameters
formValuesArray<FormValue>Required

List of field names and values for an RSVP form.

Returns
Return Type:Promise<RsvpResponse>
Did this help?