Custom state of a specific button inside a repeating group

Hey guys!
So basically I’m giving the user an option to create a new entry and this entry’s type has a repeating group searching for it in form of tabs as shown in the following pictures.

The selected element is the repeating group and the calls can be created by the users

So since this is a tab and when creating a tab you have to create custom states for each tab button, but in my case the number of tabs is dynamic so I can’t set the states for the button inside because the number differs and it’s a repeating group not a group.

My goal is when a user clicks on a specific button, that specific button will change it’s color formatting to show the user that it is clicked. While the rest will remain unchanged. Any way to do that?

Thanks in advance!

N.B (I’ve tried to use a plugin called Orchestra and it didn’t work for me, either it’s so hard for me to understand or it doesn’t accomplish what I want to be accomplished)

If I understand your question correctly, simply keep track of the “current tab” (set a custom state to whatever tab was clicked) and use a Conditional to change the style of the tab when “current tab is this tab”. The custom state can be on the RG or at the page level or wherever it makes sense.

Here’s an example demonstrating the technique (among other things). The custom state is called “mode”, and it’s on the page element.

Yeah I understand this part, my problem is the tabs are dynamic, they don’t have a fixed number so I can’t edit them one by one.

I hope this gives you a good idea of what I’m talking about

See in this picture there’s is 2 tabs because there’s only 2 entries

But when I delete an entry

As you see the number of tabs has decreased

The example I provided uses a RG as well. Did you view edit mode?

I don’t know what you mean by “can’t edit them one by one”. You don’t have to edit individual buttons. Again, check out edit mode of the example.

If you’re trying to change the appearance of the “currently selected” button (which resides inside a RG), then the example I provided should help.

It doesn’t matter how many buttons are in the group or if the number of buttons (RG cells) changes. When a button is clicked, just set a custom state to that clicked button. Then, configure a Conditional (on the so-named tab of the Properties panel) to alter the appearance of the currently selected button.

EDIT: And if your button represents a data type called “Calls”, then make your custom state of that type, and when a button is clicked, set the custom state to the “Call” that was just clicked.

1 Like

Yup it helped!
Thanks I really appreciate your help!

1 Like

No prob. :slightly_smiling_face: :+1:

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