Setting a custom state with RG on page load

Hi all,

I’ve nearly got this thing figured out but am stuck on the way an icon is displayed on page load.

Here’s what I’ve got:
Within a Repeating Group I have conditionals to change the background image when the user clicks on the dot icons:

Before conditionals and custom states are applied, the background image is set like so:

Then, as the dots get clicked the image changes via custom states and conditionals like this:

A similar set of conditionals are used for the dot icons (so you can see which dot is the current one, if you see what I mean):

There’s also a workflow to change the custom states when the dots are clicked:

The whole thing works except I can’t seem to get the first dot to be in it’s filled in state on pageload!

I’ve tried from a few points of view… I tried to set the background to State 1 on page load via conditionals and workflows. No luck (the element isn’t available within the workflows (I’m guessing this has something to do with them being within a repeating group but I have no idea).

I’ve tried changing the icon a bunch of different ways, but it seems stuck because of the conditional when Hero in RG’s Hero is not “1”.

I’m thinking of just adding in an icon over this first one and hiding it when that conditional state is set to anything but that feels like a hack.

What am I missing?

Normally I’d share the link but I’m not giving up so the page’ll keep changing on you.

Any ideas?

Totally stumped,

One way would be to adjust the radio buttons slightly so they are the ‘unselected’ radio button icon by default. Then have one conditional on each such as "When Hero in RG’s Hero is 2 --> Icon: ‘selected’ radio button. (on Dot b), and repeat for the other dots.

To make sure Dot A’s radio button is the ‘selected’ radio button icon on page load, that conditional statement could be “When Hero in RG’s Hero is empty or Hero in RG’s Hero is 1” --> Icon: ‘selected’ radio button. This way, it will look like 1 was selected on page load, even though it is empty. That should work! :slight_smile:

1 Like

Oh that’s a great idea!
I’ll give it a try.
Thanks, Faye!

1 Like

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