Search...
onRsvpCreated( )
A backend event that fires when a guest registers to a Wix event.
Description
The onRsvpCreated()
event handler runs when a guest registers to a Wix event.
The received RsvpCreatedEvent
object contains information about the created RSVP.
Note: Backend events are not fired when previewing your site.
Syntax
function onRsvpCreated(event: RsvpCreatedEvent): void
onRsvpCreated Parameters
NAME
TYPE
DESCRIPTION
event
RsvpCreatedEvent
Information about the RSVP that was created.
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
A backend event that occurs when guest registers to a Wix event
Copy Code
1// Place this code in the events.js file2// of your site's Backend section.3// Add the file if it doesn't exist.45export function wixEvents_onRsvpCreated(event) {6 let eventId = event.eventId;7 let rsvpId = event.rsvpId;8 let status = event.status;910 let firstName = event.firstName;11 let lastName = event.lastName;12 let email = event.email;13}141516/* Full event object:17 * {18 * "timestamp": "2020-04-27T12: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 * "firstName": "John",25 * "lastName": "Doe",26 * "email": "john.doe@somedomain.com",27 * "rsvpForm": {28 * "inputValues": [29 * {30 * "inputName": "email",31 * "value": "john.doe@somedomain.com",32 * "values": []33 * },34 * {35 * "inputName": "lastName",36 * "value": "Doe",37 * "values": []38 * },39 * {40 * "inputName": "firstName",41 * "value": "John",42 * "values": []43 * },44 * {45 * "inputName": "date",46 * "value": "2020-04-27",47 * "values": []48 * },49 * {50 * "inputName": "additionalGuests",51 * "value": "2",52 * "values": []53 * },54 * {55 * "inputName": "guestNames",56 * "value": "",57 * "values": [58 * "Jane Doe",59 * "Baby Doe"60 * ]61 * },62 * {63 * "inputName": "comment",64 * "value": "A comment",65 * "values": []66 * },67 * {68 * "inputName": "custom",69 * "value": "Another comment",70 * "values": []71 * },72 * {73 * "inputName": "address",74 * "value": "",75 * "values": [76 * "Wix Playground, 100 Gansevoort St, New York, NY 10014, USA"77 * ]78 * },79 * {80 * "inputName": "phone",81 * "value": "(555) 555-1234",82 * "values": []83 * }84 * ]85 * },86 * "guests": [87 * {88 * "index": 0,89 * "fullName": "John Doe",90 * "id": 191 * },92 * {93 * "index": 1,94 * "fullName": "Jane Doe",95 * "id": 296 * },97 * {98 * "index": 2,99 * "fullName": "Baby Doe",100 * "id": 3101 * }102 * ]103 * }104 */