Search.../

onEventCreated( )

An event that's triggered when a Wix Event is created.

Description

The onEventCreated() event handler runs when a Wix Event is created. The received EventCreated object contains information about the Wix Event that was created and metadata for the event.

Note: Backend events are not fired when previewing your site.

Syntax

function wixEvents_onEventCreated(event: EventCreated): void

onEventCreated Parameters

NAME
TYPE
DESCRIPTION
event
Optional
EventCreated

Information about the Wix Event that was created and metadata for the event.

Returns

This function does not return anything.

Return Type:

void

Was this helpful?

onEventCreated example

Copy Code
1
2 export function wixEvents_onEventCreated(event) {
3 const eventId = event.metadata.id
4 const entityId = event.entity._id;
5 }
6
7