I’m trying to replicate the following design in Bubble with the below functionality
- Top buttons, when pressed, change color
- When a day is selected, a new row appears on the screen and the user is prompted to input both a start time and an end time
I understand that this is using repeating groups, but when I tried, I’m running into the following issues (video below)
Can someone help explain to me why it’s showing up on multiple rows, and how to edit the visual layout of the repeating group (so they’re not on top of each other)? I’m trying to set up the “start time” and “end time” with a “+” button on the right side to give the user the ability to add a new row on that day to add another block of availability.
Finally, from a database perspective, how would that information be stored? I imagine it would look like individual rows with the following data:
Day of the week
With multiple rows per user per week, but that doesn’t feel like the simplest way to set it up…
Thanks in advance!
RGs are for displaying stored data. For something this static, I would setup 7 groups Sun to Sat with the Sunday start time Sunday end time inputs etc. then the day buttons make those groups appear. Place them all in 1 group and set them to collapse when hidden and it should work how you want it to. then you can store the values either on the user on an availability table. Your other option is to have those fields setup on the user already as is_avaliable_Sunday (default no) and sun_start, sun_end (default 00:00,224:00) then you could use a RG to display a search of availability when is_avalaible_sunday is yes in a list.
Thank you! So I think that will work if every day only had one block of availability (e.g., 9am-12pm), but what if someone had to pick up their kid from school, for example? The availability block would be 9am-12pm + 1pm-4pm or something similar.
Should I set up hidden groups to show when the “+” button is pressed?
Ok then you should have an availability table and store the users availability as records. your table should use an option set for the days of the week with a value for sorting 1-7. you can then store as many availability’s as you want and search for them. you might want to add some validation so that availability cant overlap.
Your RG is now going to be users availability. sorted by day then time.
You may want to consider a second table if you want to store the users general weekly availability, verses their varying availability week by week further down the road.
Thanks so much - sorry for the basic question, but when you mean availability table, do you mean a data type? (Like the below)
I think I have that in the following, but in that case, I’m not able to have the three column presentation where we have (Day of the week), (Start time), (End time)
Yes that’s it, a table is a data table .
That should work fine, what makes you think it wont work?
the RG should search for users availability Sorted by time of days texts order descending = no sorted by time_start descending = no.
then the RG should have the elements in a grup that is parent cells availability, where the elements respectively show:
- Cells availabilities time_days Texts, display
- time_start formatted as HH
- time_end formatted as HH
I believe that’s what I’ve been doing - sorry if I’m simply not understanding. I made a public copy of the page so you can see the workflows I’m using
Is this what you had in mind?
Hmm cant see much, seems to only show the days.
I did realise that you were trying to get availability for a certain week, I thought it was just general weekly availability .
It’s general weekly availability in a sense (because if they don’t update it for the upcoming week, it’s assumed that they keep their original availability from before)
Are the workflows and data types not showing up? (below)
Thanks again for your help - I really appreciate it. This has been stumping me for the past week