Countdown in Repeating Group

I am trying to make a count down timer in a repeating group. Basically it is a social media feed and each new post you make will have a 24 hour limit. I want to have a real time countdown in each cell. Each cell will display different times based on when it was posted. Is this possible?

Thank you!

1 Like

Hi there, @jacobsphinx… if you mean something like this…

post3

… then yup, it’s possible.

Note that in my example, I am showing the expiration in minutes in order to illustrate the countdown on posts I created a handful of minutes apart. You could have the countdown displayed in hours until it reaches a certain point, and then the countdown could switch to minutes.

Anyway, if that’s what you are looking for and you need any help getting down this path, just let me know and I would be happy to provide some screenshots of the details.

Best…
Mike

(Edit) P.S. There are a couple of countdown-related plugins (one free and one paid) that are available. I usually err on the side of trying to do things myself because I’m a bit of a control freak and I like to try to figure things out. That being said, don’t hesitate to check out the plugins!

1 Like

Thanks for the reply! Sorry I didn’t specify better. I currently have basically what you have set up. What I am trying to make work is a “Do every 1 second” condition where those timers all count down in real time in each cell. Every countdown timer I have seen has a date picker and my app sets a date when you make a new post.

Ex. When I submit a post it sets “Expiry = currentdate/time + 72 hrs” Then I want each cell to display that time and count seconds down in real time. I already have the math set up so it displays days, hours, mins, and seconds. Just can’t get the “Do every 1 second” working. Any help would be great

Ah, okay… sorry about that… your original post made it sound like you hadn’t gotten very far yet.

I found this post out there… maybe it will help?

Best…
Mike

That is the best post on the subject. It is the one that I followed to create my countdown timer

timer

@jacobsphinx this is the workflow for the do every

I use a custom state to store the value of the current date

Then you got to do this stuff that I believe was in the post Mike linked to

Screen Shot 2020-03-10 at 1.54.50 AM
Screen Shot 2020-03-10 at 1.55.46 AM Screen Shot 2020-03-10 at 1.55.37 AM Screen Shot 2020-03-10 at 1.55.28 AM

Parent Group Date is the expiry date saved in the DB

5 Likes

Does this only work if there is a button being pressed? Also how did you get the numbers to show a 0 when one of the fields has less than 10 in it? Mine has single integers. For some reason even when I make a new group it doesn’t pop up in the list of elements when I try to set that state on an element. Also each post has it’s own expiry tied to it in a repeating group. Will it still work or no?

There is no button being pressed. Check the screen shot of the workflow.

Yes it will work

1 Like

I appreciate the help, thank you. Any idea why my group won’t show up as an option when I try and select it to set the custom state on the do every second condition?

No sorry. You should make sure it has a custom state on it or just put the custom state on another element.

I think my app if messed up haha. I put it on a random text element that I could actually find when trying to select an element and it still does not update real time. I even copy and pasted the countdown timer example with all its functionality and it does not show up as an option to select as an element

Yeah, it took me about 5 hours to get mine working properly.

Okay… this thread has popped back up a number of times, and my insane curiosity has gotten the best of me, so I simply have to ask a user experience-related question.

@jacobsphinx, so every post is going to be have a countdown timer ticking away in real time, right? Won’t that be kind of distracting for the user? Why not have something like I put in my original response (and which you already had working) that is static and that updates every, say, 30 minutes or so?

You still accomplish the same goal, you don’t have to deal with trying to get the real-time countdown working, and it might (who’s to say, though) be a better experience for the user.

Anyway, I love UI and UX stuff, so again, I just needed to ask this question. Feel free to ignore it if you wish. Again, just really curious.

Best…
Mike

I think you are right on that one. I’m planning on having a page dedicated to the promotion item which has the real time countdown. In the search results with all promo items I am planning on having something like 3 days left/2 hours left/ 30 minutes left so that the user doesn’t see so many numbers changing at the same time.

1 Like

Good question. I personally don’t think it looks or would look distracting at all. One of the reasons I want it is that users directly effect the timer of each post. You can upvote or downvote each poss and see how your input effects the timer. Plus you will be able to see each post expire in real time and then delete

1 Like

Here is what each individual post looks like

Ah, very nice! Thanks for the insight… like I said, I love UI and UX stuff!

Best…
Mike

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