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:
Add an event for the corresponding time by having the input element appear when the 30 min slot is clicked
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.
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)
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.