How do you pass Quick Book input selection into variable to dynamically determine bookings service ID?

I am new to coding and am following the How to Create a Quick-Booking Form with the Wix Bookings API video. In the video he is hard coding the const serviceID from the services table. What I need is that when a user selects a specific service that service ID to be passed into that variable.

Below is the form. I have the options set up so that the values are the serviceID’s from the bookings table.


This is my code so far…

I need the const serviceID to be based on the Select Service drop down from the form so that the days and times that are then displayed are based on availability of that service.

import wixBookings from 'wix-bookings';
import wixData from 'wix-data';

const serviceID = '0314621b-e6bb-47a5-9771-c2fc0013e0dc'
let slotsMap = {}; 

// For full API documentation, including code examples, visit http://wix.to/94BuAAs

$w.onReady(function () {
 const today = new Date();
 const daysOfTheWeek = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
    $w('#dayPicker').options = getWeekDays(today).map(day => {
 return {
            label: '$(daysOfTheWeek[day.date.getDay()]} ${day.date.toLocaledateString("en-GB")}',
            value: day.date.toISOString()

Conceptually, I know how it should work but I am not sure how to actually code it. Any help would be greatly appreciated! Thank you.