Forum Academy Marketplace Showcase Pricing Features

Timed functions, loops, and multiple functions

Hey guys,
I am diving more and more into bubble and creating my first rather complex web app!

I want to created timed functions, loops and this multiple times parallelly.

To be more exact:

I want a few timers, that will show and hide objects on my page every few seconds parallely.
A page loads, and it should show an object after ~ 5 seconds. Then it should make it disappear a few seconds afterwards. Then it should make it appear/showw again and then hide it a few seconds later.

Another question would be: How can I make sure that one object is always being shown at the bottom right of the screen?

Sounds like you need to use custom states and a selection of “Do every X seconds” workflows.

For the second bit, floating group, positioned at bottom, i think.

What @DaveA says! :slight_smile:

There’s a small demo app of the custom state with timer concept here:

demo app editor

Hello @mishav

I’m very new to Bubble and currently having a blast. I’ve also been trying to solve a problem with timed functions and I found your example to be as close to what I’m trying to achieve.

My scenario I’m trying to have a user A accept an offer from another user B; however I want to include a timer so that if user B does not commit to user A’s acceptance, he is free to accept an offer from another user (user C).

I set the state to be used on a page element (cause I couldn’t find an other suitable element) and pretty much followed your example. The timer works very well ; however the timer will reset if one navigates out of the page returns to it; hence defeating the purpose

Any thoughts on how to keep the timer going regardless on where a user is in the application?

Below is a snapshot of the workflow (in red) I created

Hi @tomi.adegbenro

You’re right, the timer is just useful for within a browser session.

I think a stored (in the database) date/time for offer expiry would suit better. Then you could also include the timer on the session for a countdown to the offer expiry, on page load it can read from the database when the expiry is.

If the expiry date/time is in the past, the offer can be deemed expired, so there’s no need for server processing unless you want something special to happen at that time, even if nobody is logged in to see it.

Great that you’re having fun with timers!