Show RG 1st image when page is loaded

Hi everyone,

How to automatically show the first image in a Repeating Group like on Amazon website ?
Currently it works fine only when the user clicks on the image. But I also want to automatically show the first image of the product when the page is loaded.

Can you help please?

Thank you very much

Hey. Can somebody help?

You could use a custom state to hold the current selected image. Set that custom state to the RG’s first item on page load then change it to the current cell’s item when another image in the RG is clicked. Your main image should of course simply show the current selected image.

@louisadekoya Thank you for your help. But it seems doesn’t work. I can’t set the state to the current selected image.

Put your main image element inside a group and you can use a Page is Loaded action and Display data in a group.

Then simply set the Data to display as the Repeating Group Image's List of images: first item

Have your main image element reference Parent Group’s Image.

@Eli Thank you very much. It works!
@louisadekoya thank you agin.


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