Auto refresh answer sheet after time period

From Catglobe Wiki
Revision as of 09:45, 6 July 2017 by Hovietluu (talk | contribs) (v1)
Jump to: navigation, search

This solution will help you refresh answer sheet after time period.

Here is a way that we can use to make this solution easily:

  1. Preparing JavaScript - Java Script code for questionnaire's Java Script.
    1 // IsTestMode : bool
    2 // Parameters: string : eg: &T=1
    3 window.callWF = function(IsTestMode, Parameters){
    4   if(IsTestMode) document.location = "https://voxmeter.catglobe.com/Login.aspx?r=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&n=2&b=1&Test=1" + Parameters;
    5   else		 	 document.location = "https://voxmeter.catglobe.com/Login.aspx?r=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&n=2&b=1" + Parameters;
    6 }
    
    Let's copy this code and replace the 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' by your questionnaire GUID. Then paste it into Questionnaire's Java script tab on Questionnaire Template Editor. What is Questionnaire GUID? Don't worry, I will show you how to get it below: Please see screenshot:
    Get GUID.png
    this screenshot will show you where you paste this script:
    Questionnaire js.png
    - Java Script code for question's Java Script.
  2. Adding to questionnaire
  3. Testing