# HACK: Disabling buttons created through Button()

**URL:** <https://connect.superhuman.com/t/hack-disabling-buttons-created-through-button/61904>\
**Category:** Tips and Hacks\
**Created:** [October 27, 2026, 2:37pm UTC](https://connect.superhuman.com/t/hack-disabling-buttons-created-through-button/61904 "2026-10-27T14:37:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomldn](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/tomldn/32/50306_2.png) [@tomldn](https://connect.superhuman.com/u/tomldn)\
**Post date:** [October 27, 2026, 2:37pm UTC](https://connect.superhuman.com/t/hack-disabling-buttons-created-through-button/61904/1 "2026-10-27T14:37:40Z")

</div>

Hello again, Coda people! Did you know you can _conditionally_ disable buttons constructed through the `Button()` formula?

As it turns out, the helper formula `_BUTTON_PROPERTIES()`, which evaluates the formula-driven display properties of a normal button, has a parameter called “disabled”. I figured that it may be possible to inject this property into a custom-built button, and sure enough, using `_Merge()` and `Object()`, it is!

 ![image](https://global.discourse-cdn.com/coda1/original/3X/2/9/29c076ab4d089906845c65f26a81d30213887369.png)

Say we have a table and we want to create a custom button that can be conditionally enabled/disabled by checking a boolean (Checkbox or Toggle) column. We will first create the helper action, the **Action** column, which executes the simple formula `thisRow.ModifyRows(thisRow.Boolean, thisRow.Boolean.Not())`. This is the action that will be executed by our custom button and will change our Checkbox column, **Boolean** , from true → false and vice versa each time it is pressed. We then create a **Should disable** boolean, which will be the toggle our button checks to enable or disable itself.

Then, we can construct our custom button through `Button()`. However, to inject the disabled property, we must construct it through `Object()`.

The full formula is:

```auto
_DEREF_OBJECT(
  Object(
    "button",
    _Merge(
      Button(thisRow.Action, "Check this out"),
      Object(
        "properties",
        Object("disabled", thisRow.[Should disable])
      )
    )
  ),
  "button"
)

```

Lets break this formula down. We are creating a Coda object with the name “button” – ~~it **must** be named button for Coda to properly dereference it~~ just kidding, you can name it anything as long as you \_DEREF\_OBJECT() at that same path – and injecting it with the JSON of a custom button object. We then must also add the properties object as `BUTTON_PROPERTIES()` evalutes three arguments for properties: `text`, `badge`, and `disabled`. We only need to evaluate disabled, so we inject an Object of name “properties” with the value “disabled” equal to the value of **Should disable**. Finally, we dereference the object at path **button** , which Coda will hydrate as a button object.

As always, this is EXPERIMENTAL and I do not recommend you use this in a production doc as experimental formulas such as `Object()`, `_Merge()`, and the structure of button objects can change at any time.

(Yes, I know that disabling the underlying action will disable the button. Sometimes you don’t want this, though! Say, for example, your underlying action sends out an email in stages, and you want a specific button to be disabled but allow a _different_ button to be enabled. I could probably think of a better example but I wrote this in the middle of a lecture.)

[Check it out for yourself here!](https://docs.superhuman.com/embed/F4IYeHSUL_/_suzRt2pN?viewMode=embedplay)

---

<div class="post-metadata">

**Author:** ![Paul\_Danyliuk](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_danyliuk/32/27228_2.png) [@Paul\_Danyliuk](https://connect.superhuman.com/u/Paul_Danyliuk)\
**Post date:** [October 28, 2026, 7:30pm UTC](https://connect.superhuman.com/t/hack-disabling-buttons-created-through-button/61904/2 "2026-10-28T19:30:04Z")

</div>

Ha interesting. You aren’t using the `BUTTON_PROPERTIES()` formula in your listing though? It’s just a merge/object thing — I guess `BUTTON_PROPERTIES()` is simply syntactic sugar for that merge/object?

On another note, wondering if you can figure out how to inject the “Show confirmation dialog” properties. Because I couldn’t. I tried the properties I read from the document object model of a button (via JS console) and those didn’t register (i.e. these didn’t result in a confirmation dialog)

 ![image](https://global.discourse-cdn.com/coda1/original/3X/9/e/9e88be2456fe32422e76ff3bcae82742c5cec5b4.png)

---

<div class="post-metadata">

**Author:** ![tomldn](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/tomldn/32/50306_2.png) [@tomldn](https://connect.superhuman.com/u/tomldn)\
**Post date:** [October 28, 2026, 11:13pm UTC](https://connect.superhuman.com/t/hack-disabling-buttons-created-through-button/61904/3 "2026-10-28T23:13:24Z")

</div>

> [@Paul\_Danyliuk](#):
>
> BUTTON\_PROPERTIES()

This posting was a little poorly worded as I wrote it during a lecture haha. Paying attention to two things at once. What I meant to say is that after reading the parameters of `BUTTON_PROPERTIES()`, I assumed that we could probably just directly inject them into a `Button()` object since it already exposes a `properties` object. There was probably an easier way to figure that out… but just an educated guess.

Ive been toying with trying to inject the confirmation dialog but so far I’ve got nothing ☹  
It only seems to work when you give your helper button a confirmation dialog and reference your `Button()` button on the canvas. Will need to push further
