Check User Input in Scheduler Booking Form before Confirming the Booking

Hi,

I am using the Scheduler UI and want to know if it’s possible to grab the user provided input in the booking form to run some check on the data before confirming the booking?

I have tried finding this in the docs but nothing beyond the eventOverrides and the provided overrides don’t work with my use case.

Thank you.

Hello @alienator Let me ask the Scheduler team and will get back to you :slight_smile:

Hey @alienator sorry for the wait, here’s the response from the Scheduler Team…hope it helps you out :slight_smile:

It is possible to grab the user provided input from the event 
`detailsConfirmed` . 
They can set it up using eventOverrides as follows:

<NylasScheduling
eventOverrides={{
        detailsConfirmed: async (event, connector) => {
            console.log('detailsConfirmed', event.detail, connector);
            // Run checks on the data here
        },
}}

@Blag Thank you for the response. Just to confirm, this will not show the end user the Booking confirmation page and not confirm the booking until I run the checks under the detailsConfirmed override?

One more thing that I noticed while testing is that the detailsConfirmed override only contains information from the booking form and the booking time, all the other info such as organizer’s email, event id, booking id are not available here.

hat’s right, eventOverride is asynchronous. Unless, you call event.preventDefault() (which will stop the default action of booking), the booking will resume

1 Like

Hi :wave: @alienator,

You are right—the detailsConfirmed override runs asynchronously, and unless you use event.preventDefault(), the booking will continue. This method only provides the form data and booking time.