Need help with a reusable elements workflow

Good afternoon. Guys, I have a problem.

So we have a page. This page has a button (a reusable element!) and a popup (also a reusable element!).

Questions:

  1. How can I open a popup on click of a button?
  2. And how can I make the clicks of the button inside the reusable element affect the elements of the page on which this RE is located?

I’ve been struggling with this problem for 2 weeks now.
Please, help!

can’t you just merge two separate reusable elements into one?

1 Like

No, because sometimes they’re using separately…

Hi there, @localhost-group… set custom states to particular values when buttons inside the reusable elements are clicked, and set up Do when condition is true (every time) workflow events to have the elements on the page do something when the custom states are set to the particular values.

Hope this helps.

Best…
Mike

1 Like

Ok, so you can use custom state. Create it on button RE level (like “show popup” = yes/no).
Then some WFs:

  1. RE button clicked - set state “show popup” = yes
  2. WF “do when condition is true” (every time) → show RE popup
  3. WF “when a pop up is closed” - set state “show popup” = no
1 Like

@mikeloc @artemzheg Thank you!

I would also like to know if I have several such buttons (the same RE) on the page (they should show a popup if the user has points == 0, and if > 0, then open the link)?

And each of the buttons should do the same thing - do I need to do a workflow for each of them (RE_button_A, RE_button_B, RE_button_C) or is it possible to do it somewhere in one place, without repeating for each of the added RE instances?

Thank you so much for your help guys :heart: