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
Next revisionBoth sides next revision
en:create:timer-submit [08.02.2015 12:46] test.deen:create:timer-submit [01.06.2016 14:27] – [Implementation] klaus-peter.speidel
Line 10: Line 10:
 ===== Function ===== ===== Function =====
  
-  - The first time the questionnaire page was visited is saved in a PHP variable to start with. This means the timer cannot go onto the next page by the page being reloaded or when the Back button is used.+  - The first time the questionnaire page was visited is saved in a PHP variable. This means the timer cannot go onto the next page by the page being reloaded or when the Back button is used.
   - If necessary, the Next button (if applicable, the Back button as well) can be hidden.   - If necessary, the Next button (if applicable, the Back button as well) can be hidden.
   - A timer then starts that calls up the function to forward onto the next page after a certain amount of time.   - A timer then starts that calls up the function to forward onto the next page after a certain amount of time.
Line 17: Line 17:
 **Note:** The participant cannot restart the timer by reloading the questionnaire page ("Reload", "Refresh", F5 button). If you want to test this, do __not__ start the questionnaire from the page with the timer, otherwise a new interview will begin every time the page is reloaded . Simply start the questionnaire on the page before -- or on the first page as normal.  **Note:** The participant cannot restart the timer by reloading the questionnaire page ("Reload", "Refresh", F5 button). If you want to test this, do __not__ start the questionnaire from the page with the timer, otherwise a new interview will begin every time the page is reloaded . Simply start the questionnaire on the page before -- or on the first page as normal. 
  
-**Tip:** If your questionnaire offers a "Back" button (**Compose Questionnaire** -> //Settings//), it could make sense to hide the button on the page __after__the timer (see PHP function ''[[:en:create:functions:option#buttons_in_the_questionnaire|option()]]'').+**Tip:** If your questionnaire offers a "Back" button (**Compose Questionnaire** -> //Settings//), it could make sense to hide the button on the page __after__ the timer (see PHP function ''[[:en:create:functions:option#buttons_in_the_questionnaire|option()]]'').
  
  
Line 41: Line 41:
  
 **Note:** If you want to use multiple, independent timers in the questionnaire, the variable ''$time0'' in the PHP code has to be called something different each time. The name of the variable also has to be changed in the ''registerVariable()'' command -- therefore, a total of 5 times.  **Note:** If you want to use multiple, independent timers in the questionnaire, the variable ''$time0'' in the PHP code has to be called something different each time. The name of the variable also has to be changed in the ''registerVariable()'' command -- therefore, a total of 5 times. 
 +**Different language versions** Use the translation support tool and copy-paste the suppression of the "next" button into the different language versions.
  
 If the participant is able to restart the timer by reloading the page or using the "Back" button, you can reduce the PHP code to one line (not recommended). However, this variant will not work if you want to let the timer to run over several pages.  If the participant is able to restart the timer by reloading the page or using the "Back" button, you can reduce the PHP code to one line (not recommended). However, this variant will not work if you want to let the timer to run over several pages. 
en/create/timer-submit.txt · Last modified: 12.04.2022 21:39 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki