# Need help with a reusable elements workflow

**URL:** <https://forum.bubble.io/t/need-help-with-a-reusable-elements-workflow/277539>\
**Category:** App Organization\
**Created:** [August 12, 2023, 12:23pm UTC](https://forum.bubble.io/t/need-help-with-a-reusable-elements-workflow/277539 "2023-08-12T12:23:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![localhost-group](https://avatars.discourse-cdn.com/v4/letter/l/8491ac/32.png) [@localhost-group](https://forum.bubble.io/u/localhost-group)\
**Post date:** [August 12, 2023, 12:23pm UTC](https://forum.bubble.io/t/need-help-with-a-reusable-elements-workflow/277539/1 "2023-08-12T12:23:36Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![artemzheg](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/artemzheg/32/9651_2.png) [@artemzheg](https://forum.bubble.io/u/artemzheg)\
**Post date:** [August 12, 2023, 12:25pm UTC](https://forum.bubble.io/t/need-help-with-a-reusable-elements-workflow/277539/2 "2023-08-12T12:25:43Z")

</div>

> [@localhost-group](#):
>
> How can I open a popup on click of a button?

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

---

<div class="post-metadata">

**Author:** ![localhost-group](https://avatars.discourse-cdn.com/v4/letter/l/8491ac/32.png) [@localhost-group](https://forum.bubble.io/u/localhost-group)\
**Post date:** [August 12, 2023, 12:27pm UTC](https://forum.bubble.io/t/need-help-with-a-reusable-elements-workflow/277539/4 "2023-08-12T12:27:14Z")

</div>

> [@artemzheg](#):
>
> can’t you just merge two separate reusable elements into one?

No, because sometimes they’re using separately…

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [August 12, 2023, 12:51pm UTC](https://forum.bubble.io/t/need-help-with-a-reusable-elements-workflow/277539/5 "2023-08-12T12:51:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![artemzheg](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/artemzheg/32/9651_2.png) [@artemzheg](https://forum.bubble.io/u/artemzheg)\
**Post date:** [August 12, 2023, 12:53pm UTC](https://forum.bubble.io/t/need-help-with-a-reusable-elements-workflow/277539/6 "2023-08-12T12:53:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![localhost-group](https://avatars.discourse-cdn.com/v4/letter/l/8491ac/32.png) [@localhost-group](https://forum.bubble.io/u/localhost-group)\
**Post date:** [August 13, 2023, 11:04am UTC](https://forum.bubble.io/t/need-help-with-a-reusable-elements-workflow/277539/7 "2023-08-13T11:04:23Z")

</div>

@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 ❤
