One cell of a RG selected at a time

So I’m trying to build a daily calendar which lists the times (00:00 - 23:00) in 1 hour intervals with their corresponding events shown.

So far, I’ve put a repeating group (Calendar RepeatingGroup Times) to show the times (which works as expected) and I have broken the hour group down into two nested groups of 30 mins. Each nested group of 30 mins contains an input element where the user can add an event for the corresponding time. Here’s a pic for reference:


I want the user to be able to:

  1. Add an event for the corresponding time by having the input element appear when the 30 min slot is clicked
  2. Only be able to select 1 input at a time, across the whole daily calendar.

So far I’ve gotten close and can toggle between the two nested 30 min groups in the hour group, although can select multiple 30 min groups across the calendar, which isn’t what I want. I’ve included a pic for reference.


Any help or advice is appreciated. Thanks!

Use a state to store the active cell. That can be the cell’s index or the cell’s Thing.

On user click store the active cell.

Thanks! Not sure how to go about this though, are you able to elaborate? Thanks

When a user clicks on a 30 minute slot, instead of showing the input element, have it set a number state (you can call it something like “active input”) to current cell's index.

Now just have a visibility condition for the input group to show when the state “active input” is current cell’s index.

So I think I followed the above correctly, although it doesn’t give me right functionality still. Now I’m able to select (and make visible) all of the input groups across the RG when I click the 30 min slot/groups and no longer shows/hides each of the group’s 30 min slots like in my initial question. I’ve attached some screenshots:

Ahh so you have 3 input groups per Repeating Group cell? If yes then all you have to do is instead of just using current cell index to be stored into the state, you can do something like this:

Change the state to a text type and you use a text value for each input group in the RG cell. For example
"current cell index A"
"current cell index B"
"current cell index C"

Make sure to adjust your user click workflows and conditions appropriately

No only 2 input groups per repeating cell, sorry. The 3 showing in the screenshot above is A, B of Group 1 and just A of Group 2 (I just happened to click 3 cells and didn’t click B of Group 2)

Hmm…you have them as nested repeating groups?

They’re nested in the repeating group (Calendar RepeatingGroup Times) > Group Hours > Group 1/2 #1 and Group 1/2 #2 (these are the 30 min slots) > Input Groups > Input elements.

Looks simple enough. I’m on mobile right now so I can’t create a demo yet but what you’ll need is basically a unique identifier for each 30 min group (eg. current cell index or parent group data) and use that as an identifier in the Active Input state and to enable/disable the visibility condition.

1 Like

Thanks, I look forward to it!

@ihsanzainal84 I think I did your latest suggestion correctly, but it didn’t work as expected either.

Hi here’s a demo:
coffeehat-sandbox (bubbleapps.io)

and here’s the editor:
coffeehat-sandbox | Bubble Editor

So what I did is create 2 states:

  1. One to store the active cell’s index
  2. Another to store the active 30 min group (I used a & b)

Sorry it took a while. It’s a public holiday here.

1 Like

@ihsanzainal84 fantastic! It worked perfectly! Thank you so much and hope your public holiday is good!

@ihsanzainal84 don’t suppose you know how to deselect the cell/input if I click elsewhere outside of the wider calendar repeating group?

This topic was automatically closed after 69 days. New replies are no longer allowed.