I want to build a function: User hits a button that starts a stopwatch which shows the time since hitting the button in seconds/minutes/hours/days. The time that the user hits the button goes into the user database. Currently I’m able to show this data but I want it to be a running timer, I don’t want the user to have to refresh the page to see the time elapsed. It should look something like this: Online Stopwatch - vClock
It looks like the current timer plug ins reset when the user refreshes, whereas I need the user to be able to save the time that they hit start, leave the page, and come back to see the time elapsed and stop the timer if needed
You could create a Data Type named Time that references the current user, or a Data Entry in the User’s Data Type that would save the current time whenever the User hits a button, that way if they leave the page and come back, it’s referencing a starting time and would show the time elapsed between then and now. Then when they hit the button again it could clear or save it, however you want.
That’s one way I could think of that wouldn’t restart a timer if the page is left, since you always have a reference point.
This can be done with JavaScript. I don’t want to confuse this by giving incomplete information but I paid a freelancer to do this for me a while ago and it worked. Unfortunately I don’t understand how it works but maybe these screen shots will trigger ideas for you.
The timer looked like this (on preview it counts each second)
Yeah this was tricky, I remember we had to divide everything by 60 then times it to get the result, although it was a little more tricky than that. I’m going to private message you with access to my old app so you can see how the timer worked.