Booking for multiple people by single user but can't be able to remove other number/slot in choice component

So the numbers in your choice component represents the slot’s allocated number, not the total number of slots that person wants to book, right?

Yes they are slots for selection. however, for the total number of slots that a user wants to book too, so if a user wants to book 2 attendees then the user selects choice number 2 (and place details of the 2 attendees) but means that slots 1 & 2 should be considered Booked already and so on and so fort.

If a single user wants to books say 5, which maybe the total slots for that day & time, the user selects number 5 and put in details of the 5 attendees and which will eventually eliminated all 5 slots from the choice selections. hope this explains it. thanks

I think you can consider an approach like this:

  • Numbers now only represent the number of slots the user wants to book.
  • Have an extra Attendees table to store the Attendees for a booking, instead of having them in what seems like the same row as the booking. This is for a cleaner data structure.
  • Let them submit the booking without adding the attendees’ info, and allow them to add attendees’ info in the booking’s details screen.
  • Use relations + rollups over a booking to attendees relation to limit them to add only the max number of slots they have registered for.
  • Your choice component in the booking form limits to a number that is less than or equal to the number of slots left for that event.
  • Use an index method on the attendees table to assign the slot number to each attendee on a first come, first serve basis.

I think that should get you somewhere with your idea. If you have any questions please let us know.

2 Likes

Thanks ThinhDinh.

However, think I get lost with the relations and rollups coz don’t know from where/what I should extract/configure the data from to generate those info. I still do play around with this and this is where I think I miss :sweat_smile:

Hi Gliders,

Still haven’t found the solution for this issue I face. I am still missing of not doing something right. So if you have the solution for this issue of mine, would gladly want to hear them.

Cheers!

I think you’ll have better luck getting help if you provide screenshots showing what you have set up so far and where you are running into trouble.

2 Likes

I see 5 events, and each event has 5 slots.

I see a booking made on the second event.

I see a populated Relation for your second event showing what I assume is one related booking from a separate booking table.

I see a Rollup showing that two slots were reserved for the second event with that one booking.

I see a balance of 3 slots remaining.

Your choice component should be filtered based on the balance, so for the next booking, you should only show a max of 3 slots available.

Based purely on what you have shown in your last post, I see nothing wrong. I have no idea where you are running into problems.

1 Like

Hi Jeff,

Thanks for the reply, appreciate it.

I am having problem with the filter on the choice component coz have tried different combinations and yet either it shows same balance on all timings, not just on specific timing, like the screen shot have already booked 3 pax for the date (08/08/20 24) & time (9:00am) but still shows full slots or won’t show the slots.

Booking idea:

  • Specific Date & Time have 5 slots to choose from (as an example)
  • 1 user can book for multiple people (1 to 5), If user book 3 for 9:00 am balance for that timing should be 2 while the rest of the timings should still show available 5 slots.

So still trying different ways to achieve the above booking idea but as mentioned still faced with difficulty but do appreciate your help. :pray:

Cheers!