A backend event that fires when an RSVP is updated.
The onRsvpUpdated()
event handler runs when an RSVP is updated.
The received RsvpUpdatedEvent
object contains information about the updated RSVP.
Note: Backend events are not fired when previewing your site.
function onRsvpUpdated(event: RsvpUpdatedEvent): void;
Information about the RSVP that was updated.
// Place this code in the events.js file
// of your site's Backend section.
// Add the file if it doesn't exist.
export function wixEvents_onRsvpUpdated(event) {
let eventId = event.eventId;
let rsvpId = event.rsvpId;
let status = event.status;
let firstName = event.firstName;
let lastName = event.lastName;
let email = event.email;
}
/* Full event object:
* {
* "timestamp": "2020-04-27T13:37:22.444Z",
* "eventId": "0adc383d-db6b-4c4a-8fb8-5fe77c6569bb",
* "rsvpId": "4160c868-35b8-49f3-bff2-9d3912be9c0a",
* "status": "YES",
* "contactId": "2b1df22d-cfcf-447e-9afe-27b782aecd8c",
* "memberId": "c2b48f6f-5964-46ad-9888-1e9d3f81b83b",
* "created": "2020-04-27T12:37:22.444Z",
* "firstName": "John",
* "lastName": "Doe",
* "email": "john.doe@somedomain.com",
* "rsvpForm": {
* "inputValues": [
* {
* "inputName": "email",
* "value": "john.doe@somedomain.com",
* "values": []
* },
* {
* "inputName": "lastName",
* "value": "Doe",
* "values": []
* },
* {
* "inputName": "firstName",
* "value": "John",
* "values": []
* },
* {
* "inputName": "date",
* "value": "2020-04-27",
* "values": []
* },
* {
* "inputName": "additionalGuests",
* "value": "2",
* "values": []
* },
* {
* "inputName": "guestNames",
* "value": "",
* "values": [
* "Jane Doe",
* "Baby Doe"
* ]
* },
* {
* "inputName": "comment",
* "value": "A comment",
* "values": []
* },
* {
* "inputName": "custom",
* "value": "Another comment",
* "values": []
* },
* {
* "inputName": "address",
* "value": "",
* "values": [
* "Wix Playground, 100 Gansevoort St, New York, NY 10014, USA"
* ]
* },
* {
* "inputName": "phone",
* "value": "(555) 555-1234",
* "values": []
* }
* ]
* },
* "guests": [
* {
* "index": 0,
* "fullName": "John Doe",
* "id": 1
* },
* {
* "index": 1,
* "fullName": "Jane Doe",
* "id": 2
* },
* {
* "index": 2,
* "fullName": "Baby Doe",
* "id": 3
* }
* ]
* }
*/
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.