User Tools

Site Tools


countdowntimer

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
countdowntimer [2024/06/12 08:20] admincountdowntimer [2024/06/12 08:28] (current) – [Pausing the Timer] admin
Line 58: Line 58:
 </code> </code>
 === Timer Seconds === === Timer Seconds ===
-Set the timer seconds embedded data field(s) by setting the field value in seconds at the appropriate places in the survey flow. Timer seconds is the amount of time allowed to complete a timed section of the survey. The timer secs embedded data field must be prefixed by "__js_" in the survey flow, display logic, and piping since it will be updated by the countdownTimer JS function. For example, to set the time limit to one hour:+Set the timer seconds embedded data field(s) by setting the field value in seconds at the appropriate places in the survey flow. Timer seconds is the amount of time allowed to complete a timed section of the survey. The timer secs embedded data field must be prefixed by "%%__js_%%" in the survey flow, display logic, and piping since it will be updated by the countdownTimer JS function. For example, to set the time limit to one hour:
 <code> <code>
 __js_timerSecs = 3600 __js_timerSecs = 3600
Line 103: Line 103:
 Default: 1 Default: 1
 ===== Pausing the Timer ===== ===== Pausing the Timer =====
-To pause a timer (have a timed section, pause, then start the timer where it left off), turn **[[countdowntimer#Timer On/Off|Timer On/Off]]** off at the end of the first timed section, then when it is turned back on set the new **[[countdowntimer#Timer Seconds|Timer Seconds]]** equal to the previous Timer Seconds.  For example:+To pause a timer (have a timed section, pause, then start the timer where it left off), turn **[[countdowntimer#Timer On/Off|Timer On/Off]]** off at the end of the first timed section, then when it is turned back on set the new **[[countdowntimer#Timer Seconds|Timer Seconds]]** equal to the previous Timer Seconds.  For example if the function call is:
 <code> <code>
 +countdownTimer({timerSecsVar: "${e://Field/timerSecsVar}"});
 +</code>
 +Then the survey flow would be:
 +<code>
 +Set Embedded Data:
 +  timerOn = 0
 +  __js_timerSecs1 = 3600
 +  timerSecsVar = timerSecs1
 Block: Timed section Block: Timed section
 Set Embedded Data: Set Embedded Data:
Line 112: Line 120:
   timerOn = 1   timerOn = 1
   __js_timerSecs2 = ${e://Field/__js_timerSecs1}   __js_timerSecs2 = ${e://Field/__js_timerSecs1}
 +  timerSecsVar = timerSecs2
 Block: Initialization Block Block: Initialization Block
 Block: Continue timed section  Block: Continue timed section 
countdowntimer.1718194822.txt.gz · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki