I am working on a repeating group with images / and an overlay for each image. When you click on an image the overlay for that image appears, see example below. The problem I’m trying to solve is that I would like there to be a maximum of one overlay visible at any one time. This would mean if one overlay is visible and the user clicks on a second image, the overlay for the first image is hidden, and the overlay for the second image is shown.
I’m really struggling to find a way for two different elements within a repeating groups to interact in this way.
The only thought I had was if I could get a custom state to trigger a workflow - is this possible?
Any other ideas would be really helpful!
Screenshot 2019-11-07 at 00.18.02
Hi, you are on the right track with the custom state. Create a custom state of type number and call it say ‘showOverlay’. When you click on the image run a workflow to set the state’s value to the current cell’s index.
On your overlay element, create a condition that says when showOverlay’s value is current cell’s index then this element is visible.
That will hide the previously clicked images overlay when it shows the new one.
Amazing! I’ll give this a try as soon as I get a chance. Sounds very promising. Thanks @eli!
Just implemented this and works exactly as I need! Thanks again for your help.
This topic was automatically closed after 70 days. New replies are no longer allowed.