Search.../

onRsvpUpdated( )

A backend event that fires when an RSVP is updated.

Description

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.

Syntax

function onRsvpUpdated(event: RsvpUpdatedEvent): void

onRsvpUpdated Parameters

NAME
TYPE
DESCRIPTION
event
RsvpUpdatedEvent

Information about the RSVP that was updated.

Returns

This function does not return anything.

Return Type:

void

Was this helpful?

A backend event that occurs when an RSVP is updated

Copy Code
1// Place this code in the events.js file
2// of your site's Backend section.
3// Add the file if it doesn't exist.
4
5export function wixEvents_onRsvpUpdated(event) {
6 let eventId = event.eventId;
7 let rsvpId = event.rsvpId;
8 let status = event.status;
9
10 let firstName = event.firstName;
11 let lastName = event.lastName;
12 let email = event.email;
13}
14
15
16/* Full event object:
17 * {
18 * "timestamp": "2020-04-27T13:37:22.444Z",
19 * "eventId": "0adc383d-db6b-4c4a-8fb8-5fe77c6569bb",
20 * "rsvpId": "4160c868-35b8-49f3-bff2-9d3912be9c0a",
21 * "status": "YES",
22 * "contactId": "2b1df22d-cfcf-447e-9afe-27b782aecd8c",
23 * "memberId": "c2b48f6f-5964-46ad-9888-1e9d3f81b83b",
24 * "created": "2020-04-27T12:37:22.444Z",
25 * "firstName": "John",
26 * "lastName": "Doe",
27 * "email": "john.doe@somedomain.com",
28 * "rsvpForm": {
29 * "inputValues": [
30 * {
31 * "inputName": "email",
32 * "value": "john.doe@somedomain.com",
33 * "values": []
34 * },
35 * {
36 * "inputName": "lastName",
37 * "value": "Doe",
38 * "values": []
39 * },
40 * {
41 * "inputName": "firstName",
42 * "value": "John",
43 * "values": []
44 * },
45 * {
46 * "inputName": "date",
47 * "value": "2020-04-27",
48 * "values": []
49 * },
50 * {
51 * "inputName": "additionalGuests",
52 * "value": "2",
53 * "values": []
54 * },
55 * {
56 * "inputName": "guestNames",
57 * "value": "",
58 * "values": [
59 * "Jane Doe",
60 * "Baby Doe"
61 * ]
62 * },
63 * {
64 * "inputName": "comment",
65 * "value": "A comment",
66 * "values": []
67 * },
68 * {
69 * "inputName": "custom",
70 * "value": "Another comment",
71 * "values": []
72 * },
73 * {
74 * "inputName": "address",
75 * "value": "",
76 * "values": [
77 * "Wix Playground, 100 Gansevoort St, New York, NY 10014, USA"
78 * ]
79 * },
80 * {
81 * "inputName": "phone",
82 * "value": "(555) 555-1234",
83 * "values": []
84 * }
85 * ]
86 * },
87 * "guests": [
88 * {
89 * "index": 0,
90 * "fullName": "John Doe",
91 * "id": 1
92 * },
93 * {
94 * "index": 1,
95 * "fullName": "Jane Doe",
96 * "id": 2
97 * },
98 * {
99 * "index": 2,
100 * "fullName": "Baby Doe",
101 * "id": 3
102 * }
103 * ]
104 * }
105 */