Element events
Events that are triggered when the user interacts with an element on the page.
Last updated
Events that are triggered when the user interacts with an element on the page.
Last updated
This core reference entry is suited for beginner-level builders.
This event is triggered when the user clicks on the element. Most can trigger this event, including texts, buttons, images, and icons.
This event is triggered when the value of an input changes. For text inputs, the event is triggered when the user removes focus from the input.
This event is triggered when the user clicks a map's marker. 'This map's current marker' refers to the marker the user clicked.
This event is triggered when a popup opens through a Show an element/Toggle an element action or if an Animate an element action .
This event is triggered when a popup is closed through a Hide an element/Toggle an element action, if an Animate an element action , or when the user presses Esc.
Note on timing: An popup is considered closed as soon as the Hide this element action is executed, or the user presses the Esc button. However, popups fade out by default, and as a result the actions may run before the popup is actually hidden for the user.
In cases where you want to avoid this (such as when the result of the workflow may be visible on-screen while the popup is fading out), you can schedule a custom event to run in about 0.5 seconds. This gives the popup time to be completely hidden before the actions run.
This event is triggered whenever Bubble reports an in a workflow that was initiated by a specified element, such as a failed login attempt, as well as unexpected errors, such as the user being offline and Bubble being unable to communicate with the server.
This workflow takes priority over An unhandled error occurs. In other words, if both events are potentially triggered, only the The An element has an error running a workflow event will run.
The default handling of errors in a Bubble app is to automatically display the error to the user using the browser's default alert system.
For workflows handling unexpected errors, it's advised not to fetch data from the database or external APIs. This is because network or connectivity issues, which might cause the initial error, could also make the error workflow itself fail. This happens if the workflow depends on data that cannot be accessed due to these issues. In such cases, users might end up seeing an error alert if the error workflow doesn't execute successfully.
The Element setting specifies which element Bubble should watch for errors. For example, if you place it on a button, any errors happening in workflows initiated by that button will be caught.
Each error in Bubble has a unique code. If you want to set up the workflow to react to a specific error, you can define this using a on the event or action that includes the error code:
To identify the error code:
Use the Current workflow error's code
You can find the list of all error codes in Settings - Language and scrolling to the bottom of the language text strings.
Error codes are .
In the same way as above, you can also return the error message Bubble would normally display. You can combine the code and the message to manage all errors in the same way, or identify specific errors by using .
To identify the error message:
Use the Current workflow error's message
You can find the list of all error messages in Settings - Language and scrolling to the bottom of the language text strings. They can be customized as you see fit.
Error codes are not .