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?
Hi there, @jacobsphinx… if you mean something like this…
… 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!
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
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?
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?
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
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.
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.
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