Has successfully completed the online course Introduction
Has successfully completed the online course Intermediate (200)
Has successfully completed the online course Advanced (300)
Has successfully completed the online course Basics (100)Hi Leonid,
this is indeed a common problem and your best solution would be to block the submit button as soon as the click happened and wait for a defined time interval until it may become clickable again. We are intending to make respective enhancements for some of our Simplifier widgets like ‘Button’ in a future version of the Standard Content package, but currently you would need to add this behaviour on your own still.
I find the easiest way to only allow one click on a button during a given time interval is by using a throttling mechanism. The Javascript library lodash, which is included in our Standard Content, offers such functionality. The throttle method of lodash expects a callback function that should only get invoked once per the given time interval in milliseconds. You could write a small function inside a Script activity or inside a client-side business object which invokes a custom event via the API ‘this.callCustomEvent(‘<myEventName>’)’ inside its body. This Script / client-side business object activity needs to be connected to the press event of your button. As an effect, the custom event would only get invoked once during that time interval, so you could decide to allow only one click on the submit button per every x seconds.
If you would require a standard function for throttling events in our Standard Content, you could also express this wish by creating a feature request in our Ideasportal.
Please let us know whether this helps you.
Kind regards,
Armin