# Problem with disable button or formula?

**URL:** <https://community.weweb.io/t/problem-with-disable-button-or-formula/6581>\
**Category:** Ask us anything\
**Created:** [January 24, 2024, 4:56pm UTC](https://community.weweb.io/t/problem-with-disable-button-or-formula/6581 "2024-01-24T16:56:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mark](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/mark/32/4163_2.png) [@mark](https://community.weweb.io/u/mark)\
**Post date:** [January 24, 2024, 4:56pm UTC](https://community.weweb.io/t/problem-with-disable-button-or-formula/6581/1 "2024-01-24T16:56:45Z")

</div>

Hi, In my case I can’t figure out whether the Disable button feature isn’t working due to my lack of understanding how the feature works, or if my formula is incorrect? Because I cant find any documentation on the button element, its tough to know where my problem actually is. Any help would be greatly appreciated, thanks!

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/max/32/4844_2.png) [@Max](https://community.weweb.io/u/Max)\
**Post date:** [January 24, 2024, 6:08pm UTC](https://community.weweb.io/t/problem-with-disable-button-or-formula/6581/2 "2024-01-24T18:08:13Z")

</div>

Hi @mark!

“Disabled: On” means that now the button is disabled. Unfortunately, you cannot bind the disabled status to a state as you are trying to do. You need to bind the condition to the Disabled prop directly.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![Profound5753](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/profound5753/32/6870_2.png) [@Profound5753](https://community.weweb.io/u/Profound5753)\
**Post date:** [January 24, 2024, 6:19pm UTC](https://community.weweb.io/t/problem-with-disable-button-or-formula/6581/3 "2024-01-24T18:19:49Z")

</div>

I was about to suggest the same. 🙂

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [January 24, 2024, 10:17pm UTC](https://community.weweb.io/t/problem-with-disable-button-or-formula/6581/4 "2024-01-24T22:17:25Z")

</div>

It’s funny how no one of the commenters really thought twice about this, and even copilot got you wrong, good observations about the binding though.

Instead of the ifEmpty, since you can’t bind it in one place, i suggest a more sustainable approach:

1. Create a formula

 ![Screenshot 2024-01-24 at 23.14.07](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/2/21c507d771886b3245bad4cb740cc8cc8245ae22.png)

1. Bind the formula both to the state and the Settings → Disabled

 ![Screenshot 2024-01-24 at 23.14.53](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/a/a6c8c0226cb8a04dacaf2609324250b950f03c1b.jpeg)  
 ![Screenshot 2024-01-24 at 23.14.46](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/e/e9fd56d4699077d367733a0429f03a60f139a7ce.jpeg)

1. Enjoy the fruits of your hard work

 ![Screenshot 2024-01-24 at 23.15.58](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/5/508af95e6d88ab1894321ceb2b49d2264df877c9.png)  
 ![Screenshot 2024-01-24 at 23.15.51](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/8/89e654c022a39f4c02995573b52b185cf89701ae.png)

For the future, I’d suggest using a more dynamic approach, especially if you have many forms like this, repeating the formula, or even the logic might be redundant. I’m always down to talk about stuff like this e.g. best practices, I have a link in my bio if you’re interested 🙂

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/max/32/4844_2.png) [@Max](https://community.weweb.io/u/Max)\
**Post date:** [January 25, 2024, 4:42am UTC](https://community.weweb.io/t/problem-with-disable-button-or-formula/6581/5 "2024-01-25T04:42:41Z")

</div>

To be honest, I didn’t check the formula, because I saw that mark wanted to bind it to a state and that’s not possible. Nice catch 😉

---

<div class="post-metadata">

**Author:** ![mark](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/mark/32/4163_2.png) [@mark](https://community.weweb.io/u/mark)\
**Post date:** [January 31, 2024, 6:43am UTC](https://community.weweb.io/t/problem-with-disable-button-or-formula/6581/6 "2024-01-31T06:43:28Z")

</div>

Thanks! This is perfect. I definitely need to start using Formulas more often. I think they are the 1 thing I’m not utilizing enough.
