Button basics

Take actions from your doc with the click of a button. Learn how to create buttons, customize them, and use them to automate tasks.

Updated over a week ago

With buttons, you can add even more interaction to your Coda docs - allowing you to turn your doc into a customized app for your team. Buttons have countless applications and can work in tandem with Coda other building blocks. They’re a great way to save time and elevate your doc.

Within this article you’ll find...


Add buttons to your page

Buttons can be added to both the canvas of your doc and to tables. To add a button to your doc canvas:

  1. Type /button anywhere on the canvas to surface a list of button options.

  2. Choose from any of our pre-built buttons (like Open hyperlink or Copy doc), or choose New button to start from scratch.

  3. Once your button is added, jump down to Configure your button for next steps

add new canvas button.gif

💡 Tip: you can copy and paste buttons and we'll retain them in their entirety so you can move them around as need be!

Add buttons to your table

In addition to creating buttons on your page, you can add button column types to your tables. You would want to use buttons in a table over buttons in a canvas if you want to incorporate content from the row in some form in the button. For example, if you want a button to email a project owner in a table of projects, you would set up a button column and configure it to only email the person in the same row.

To add a button column to your table:

  1. Click on the plus icon (+) in the upper right corner of your table to add a new column

  2. For column type, select Button.

  3. Once your button column is added, jump down to Configure your button for next steps

add table button column.gif

Configure your button

Once you’ve added a button to your canvas or a button column to your table, it’s time to configure your button. This is where you can specify what you want your button to do, when it should be disabled, and how it should appear.

  1. In the button configuration panel, you’ll first see the On click field. This is where you specify what you want your button to do when clicked. Choose from any of the options in the dropdown, or click the f symbol in the upper right to open the formula builder.

    💡Tip: In addition to Coda’s native button actions, there’s also a whole suite of Pack button actions - including Send Email (via the Gmail Pack), Post Message (via the Slack Pack), and more. Check out this article to learn more about Pack buttons.

  2. Depending on which option you choose from the dropdown, you’ll then see different fields. Complete the fields accordingly.

    1. Jump to the section below to see some common button setups.

  3. Under the Visual section of the button settings, set a label (the text that will be displayed on your button).

    💡Tip: Check out this video to learn how to use an image instead of text for your button’s label.

  4. Then choose the size, the color, and the icon.

configure canvas button.gif

Under the Advanced section of the button settings, you can really fine tune your button.

  • Disable if: If you want your button to be disabled under certain circumstances, add a formula to the Disable if field.

    • For instance, maybe you want your button to be disabled after a certain date. You can enter the formula: today()<=ToDate("03-30-2023") . Then the button will be disabled starting on March 30th, 2023.

  • Badge: Use the optional Badge field if you want a number to be displayed in the corner of your button.

  • Show alert: By default, you’ll see a small pop-up at the bottom of your doc whenever you click a button. You can use the Show alert field to change this.

  • Name: Optionally, you can also give your button a Name. This lets you easily refer to the button in future formulas.

1_1 (3).png

Voilà! You've got a beautiful button!

Some button examples

Buttons have limitless potential. But if you’re new to buttons and need some inspiration, check out these examples:

FAQs

Can I see all the buttons in my doc?

You can see all the canvas buttons in your doc by clicking on the gear icon in the upper right of your doc, and selecting Doc map. Here you’ll see a section titled Other Objects, which includes all canvas buttons. Note that buttons columns are not included in this.

Can I use a button to send someone a notification?

Yes! You can create a button that sends custom Coda notifications to a person (or people). To do so, choose the Send message or notify user action from the On Click dropdown menu. If you want to send a Coda notification, choose Notification from the Send as options.

Alternatively, in that Send as field, you can choose to send a Slack message or an email via Gmail. If you haven't yet, you'll need to go through the process of connecting those Packs to your doc.

How can I deactivate buttons?

Buttons can be deactivated using the Disable if field, under the Advanced section of the button settings. This field requires a formula input, so head on over to this article if you need a formula refresher.

Is there a way to prevent certain people from pushing buttons?

By default, anyone with edit access can push buttons in your doc. But you can change this in a few days.

You can use the Disable if field (see above) to specify when your button can be clicked - and by whom.

If you’re on a Team or Enterprise plan, you can also use locking to limit the use of buttons on specific pages.


Related resources

Did this answer your question?