Hello all,
I’m building a ‘scheduling’ system which allows the user to add the dates of their class (e.g. cooking class). I’ve come up with a fairly rudimentary system which works. The user can select a date (e.g. 31st October @ 5pm) and then repeat this weekly, fortnightly, monthly or just keep it as a one off.
I have a repeating group that displays the results - so if they chose 31st October @ 5pm until 21st November, there would be 4 sessions (31st October, 7th Nov, 14th Nov, 21st Nov). So far so good…
You can see the general layout here (I’ll neaten it up once everything is working). The user clicks ‘Add my schedule’, which brings up a popup and allows the user to select their start date + time, the end date, and the frequency:
Anyway, once a user has entered in this information, they can ‘submit’ the listing. I am saving the calendar dates into my database as Date (list: yes), I’m not sure if this is correct.
–
Once the user clicks submit, this is how I’m saving the listing (it’s called ActivitySchedule):
As you can see, I’m using ‘set list’, although I’m a bit lost here. Any help at this stage is appreciated
–
I’m trying to populate a dropdown on the activity page with all the available dates + times. I do want to integrate this into a booking form, but for now I’m just trying to get it to work on the page. I’m not sure how to call upon the dates, but I figured if I did the other bits incorrectly, then I may be a little stuck on this.
–
Bonus: I have allowed users to set a number of ‘spaces’ for each class. If all the class spaces have sold out for a particular class, I don’t want it to appear in the booking dropdown. If all class spaces have sold out for ALL classes, then I don’t want the class to be visible in the search. Would be great if someone could help/guide me.
Edit link: [Removed]
Thanks to anyone who helps!