"Send" button disabled after click

Hi there,

so I’m making a doc for a user testing in which I get a list of registered attendees from Calendly (using Zapier). In each row ther’s also a button (integrated with Gmail) to send a an email witth a link to form that each user need to fill before the meeting (privacy agreement).

Now I’ve set the button and it works like a charm, but one think i’d like to add it’s the option to give sort of visual feedback if for that row, the send button it’s been pressed already or not. It could be a disabled state, or a badge count…but I can’t find a way to do it.

Any help? Thanks!

PS
I’m trying to move my team to Coda, and I’m loving working on it!!!

Quick way to do it is to make additional “support” column, and than make your button also edit that column (for example when you press button write Yes in the column), and then put disable button if value = “YES”.
You can also change Label of the button in similar fashion using IF statement. IF column is YES than name is “Mail sent”, otherwise “Not Sent”

There are also other ways to achieve this, but this comes to mind first and is relatively easy to implement

I can go into more details once I am home, currently at work so cant write long stuff :slight_smile:

Hi Marko,

thanks for your help. Problem with this is that the button trigger a Gmail send email pack, so there’s no additional option that can be set…

If you “expose” formula in button like in the gif below you can add additional actions to the button

1 Like

This seems like a solution thanks for that! Can I ask you a bit more of help to add the correct formula? I’m not yet a formula master! Or if you have any resource that could help in writing proper formula, would be appreciate too!

Thanks!

This is how it should look to work in a way I described above:

Where you replace Gmail::SendEmail part with your current Gmail formula. RunActions() allows you to run multiple actions by same button. ModifyRow() part will edit the supporting “Sent?” column with the YES text once button is pressed (you can call that additional column however you like and write in it whatever you want just replace text in formula accordingly :slight_smile: ).

After that just setup disable IF option in button like this:

disable if

After that once the button is pressed and email sent it will be permanently disabled until you manually edit text in Sent? column or remove disable IF part. Hope it helps.

Also once you set everything up you can hide supporting column so it doesn’t clutter your table, it will continue to work in background :slight_smile:

I can probably share whole document with formula if you still have troubles later when I am at home since I need to switch to my private Coda account, cant share stuff from Business one :smiley:

1 Like

Awesome I got it, and also It did make sense understanding how to write the formula, thanks for that, thanks!

One plus and then we’re done, since my table it’s a bit different, I have a checkbox under the Sent? column, so using a bit of imagination I try to write the formula like this ModifyRows(thisRowthisRow.Inviata,True())) and for the disable like this thisRow.Inviata=True but it’s now working.

Where’s the problem?

Just use text true instead of function True() and it should work :smiley:

Hi Marko, still no working or I mean, not automatically.

If I check manually the box the button became disabled, but if I press the send button the checkbox won’t change its status to true and disabled it automatically…

This is the formula:
Gmail::SendEmail([email@email.it], thisRow.Email, "Email title", List("Email body"),ModifyRows(thisRow,thisRow.Inviata,true))

What am I missing? Thanks!

Did you use RunActions() in front?

Should be
RunActions(Gmail::SendEmail([email@email.it], thisRow.Email, "Email title", List("Email body"), ModifyRows(thisRow, thisRow.Inviata, true)))

Otherwise button wont run both actions. Everything else looks fine

Uhm still no luck after pressing the send button nothing happen to the checkbox and the button stays “clickable”

Hmm, that’s strange. Maybe I am missing something.

I made a quick test document, it works ok for me. Take a look

2 Likes

Still no working,

my coda it’s pretty similar to yours, could it be related to the fact that I’m missing some packs? Not sure what else could be…

Thanks for your time anyway Marko, I do really appreciate your help!

Hmm, I don’t know why it wouldn’t work. It doesn’t have to do anything with packs. Only pack it uses is Gmail pack.

Did you try to make a new doc and basically just copy the setup (tables, formulas everything exactly same) I made in previous post just to check if it works. Then if it is, you will know that something in your setup is wrong.

In case that exact setup is still not working, I would be quite surprised to be honest. Then contacting Coda support would probably be way to go.

p.s. When you press the button mail get sent, but checkbox don’t change status?

1 Like

Hi again Marko,

so I can confirm that coping your coda example in my workspace it does work! But mine still not working, I’ve tried to compare them the only diffrence it’s in the message where I have this structure:

RunActions(Gmail::SendEmail([email@email.con], thisRow.Email,"Subject", List("Long email body....)

So instead of getting the text from a cell, I have a list added inside the formula for it, that’s it, the rest it’s the same…

I’ve asked for support, I’ll let you know how’ll end. Thanks again!

It was a parenthesis missing…the coda support helped…silly me!

Well glad my suggestion helped you to solve this problem :slight_smile:
Also :+1: for Coda support for helping with syntax error.

I am kind of surprised that Coda didn’t warn you in formula builder that you are missing parenthesis. Its usually pretty good with that kind of stuff :thinking:

My bad, not missing, but placed in wrong position…so the number of parenthesis was fine, not their position, and that was causing the operation not to perform as it should.