Saving the time left from countdown timer and resurfacing it

Hi guys,

I am using this plugin to set a coundown timer on a popup.

It works fine and the correct values display in the popup when the user creates the task. However! I want to bring that live countdown inside the task page in an element and display the remaining time (hours) for this user’s tasks, everytimet the user accesses that task.

How would I do that? Do i have to write the remaining time into the task’s table database or is there an easier way?

If I think about it logcally, whenever the user starts the task, I would trigger the countdown timer and then pause it when the user pauses the tasks. What and how do I do next? Do i just save the remaining time (hours) in the database or in a “persistent” variable? does something like. that exist?

1 Like

Yes, save the remaining time as a field in the Task database, then re-trigger the timer when they go back to the task.

Would probably store the value as minutes or seconds rather than hours for easier granularity.

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