Buttons on popups when pressed too quickly causing problems

Hello Community,

We expect buttons on popups to work only once before disappearing. For example ‘Would you like to create a new record’? and clicking ‘yes’ should insert a record. But if the user rapidly presses the yes button multiple times then bubble-engine is inserting multiple records (or does whatever action multiple times).

Someone suggested creating a custom action to disable a button after click should solve this but in our test pressing a button rapidly is still causing it to do the action multiple times, although the click-window has reduced. We want to consult with the forum first before suspecting if its a bug

We are currently checking if this happens with non-popup buttons and other commonly used buttons like the signup button. Your input/testing will be appreciated.

1 Like

Create test page and share your editor with the forum… That’s by far the best approach to get support

For things like this, I always set the first step of the workflow to hide or disable the button. Before it tries to do any data changes, I disable the button. I haven’t had any issues with that approach yet.

4 Likes

Concur with @andrewgassen

1 Like

@Bubbleboy Thanks

Here is the editor link

and preview

Press the ‘Enter data’ button’.Once the popup appears, enter some text and rapidly press the ‘Submit’ button multiple times before the popup disappears. You will notice multiple entries entered in the table below. We want only ONE entry action only to be performed.

We have tried giving a custom state and have the hidhepop as first step as suggested by @andrewgassen

good man. so im not sure if you want to close the popup after the name has been entered…ive left it showing…so you can furiously press the button to try and create more than one entry. I think that should solve it.

As @andrewgassen mentions I’ve added a custom state which upon pressing the button disabled the button while the workflow runs. Clears the input and then make the button available. It’s always good practice I believe to set a condition in these situations where the workflow will only run when the input is not empty. I added that you can obviously just take out

We do something similar that, perhaps, has added value in that we give feedback to the user that the action is happening in the background. Here are the details for anyone interested.

Instead of setting the button to be disabled, we set a custom state on the button (e.g., isSubmitting = yes) and then set the button to display alternate test when isSubmitting = yes, which often includes a spinning cog so the user knows it’s in progress. For example, this button might say “[fa] fa-cog fa-spin [/fa] Submitting…” - We’ve found this to be slightly better UX anytime the actions take more than 300ms to run, and becomes much more important if it takes more than a second or two to run simply because it provides feedback to users that we understood their click and are working on it.

A few extra pieces to our standard set-up:

  • Once the workflow is finished running we set isSubmitting = No.
  • Rather than use buttons we use text fields that look like buttons so we can use font-awesome for the spinning cog.
  • We set the workflow to trigger only when IsSubmitting = No, so that users can’t trigger it twice by double pressing it.
2 Likes

Are you saying that fa cog fa spin can display a rotating cog in your button (text imitation)
:exploding_head:

Does that mean it can display and fa icon?

1 Like

Yes, that’s correct. Works in text elements (that look like buttons) but not buttons themselves.

1 Like

@Bubbleboy / all .

In the example, I already had a custom state to disable the button after button-click. But bubbleboy added a condition to only run workflow if the text entry is not empty and the last step in the wf empties text. This seems to have done the trick

Thank you all.

As I mentioned it’s usually good practice to only add something when the input is not empty… You can easily follow the advice of the other community members who have commented with great ideas also.

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