# Need Help with the Button

**URL:** <https://forum.bubble.io/t/need-help-with-the-button/24624>\
**Category:** Need help\
**Created:** [February 18, 2018, 8:05pm UTC](https://forum.bubble.io/t/need-help-with-the-button/24624 "2018-02-18T20:05:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![villasanaa9](https://avatars.discourse-cdn.com/v4/letter/v/5f9b8f/32.png) [@villasanaa9](https://forum.bubble.io/u/villasanaa9)\
**Post date:** [February 18, 2018, 8:05pm UTC](https://forum.bubble.io/t/need-help-with-the-button/24624/1 "2018-02-18T20:05:25Z")

</div>

Hello im working on a CAD/MDT for a roleplay community im trying to make the button tool change color and stay on that color, till i click on it again to change back to the original color  
i’ve been looking but not sure if its possible, plz help thx.

---

<div class="post-metadata">

**Author:** ![mebeingken](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mebeingken/32/20139_2.png) [@mebeingken](https://forum.bubble.io/u/mebeingken)\
**Post date:** [February 18, 2018, 9:24pm UTC](https://forum.bubble.io/t/need-help-with-the-button/24624/2 "2018-02-18T21:24:24Z")

</div>

Not sure this is the optimal approach, but it works:

> **[Bubble Editor - toh-samples](https://bubble.io/page?type=page&name=buttons&id=toh-samples&tab=tabs-2)**
>
> Build stuff without code and launch a startup without a tech-cofounder! Bubble is a visual programing language. Instead of typing code, use a visual editor to build applications.

It is basically setting a custom state for each color, plus the active color (all in hex codes including the hash.) That value is placed on the properties of the button color.

–Ken

---

<div class="post-metadata">

**Author:** ![villasanaa9](https://avatars.discourse-cdn.com/v4/letter/v/5f9b8f/32.png) [@villasanaa9](https://forum.bubble.io/u/villasanaa9)\
**Post date:** [February 18, 2018, 10:05pm UTC](https://forum.bubble.io/t/need-help-with-the-button/24624/4 "2018-02-18T22:05:40Z")

</div>

im new to all of this, so i actually need a step by step because it was telling to make all these things  
and could not understand it.

---

<div class="post-metadata">

**Author:** ![mebeingken](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mebeingken/32/20139_2.png) [@mebeingken](https://forum.bubble.io/u/mebeingken)\
**Post date:** [February 18, 2018, 11:16pm UTC](https://forum.bubble.io/t/need-help-with-the-button/24624/5 "2018-02-18T23:16:51Z")

</div>

Understood, it takes a little time to get started. The sample is using a workflow and custom states, along with a dynamic color setting. If all that is foreign to you (it was to me too for a while,) then my advice is to carefully go through all the lessons and videos found here: [https://bubble.io/documentation](https://bubble.io/documentation) and find the specific topics in the manual. For example, custom states can be found here: [https://manual.bubble.is/working-with-data/element-custom-states.html#element-custom-states](https://manual.bubble.is/working-with-data/element-custom-states.html#element-custom-states)

–Ken

---

<div class="post-metadata">

**Author:** ![andmilne](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/andmilne/32/3716_2.png) [@andmilne](https://forum.bubble.io/u/andmilne)\
**Post date:** [February 19, 2018, 1:13pm UTC](https://forum.bubble.io/t/need-help-with-the-button/24624/6 "2018-02-19T13:13:31Z")

</div>

You could set up a field in the user database which clears when the page is refreshed (or other times you need it). You could set the field to either yes/no for 2 colours, or more word/number options if you need more colours. Then when you press the button, you set a workflow to change that field in the User, and back again when it is pressed again. In the buttons conditions, you set the colour based on that field’s value.

If the page/group is current user, you may be able to use autobinding, but I’ve never tried it from a button click.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [April 29, 2018, 8:05pm UTC](https://forum.bubble.io/t/need-help-with-the-button/24624/7 "2018-04-29T20:05:26Z")

</div>

Closed on April 29, 2018, 8:05pm UTC

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