Difference between revisions of "Auto refresh answer sheet after time period"

From Catglobe Wiki
Jump to: navigation, search
(Created blank page)
 
(v1)
(Tag: visualeditor)
Line 1: Line 1:
 +
This solution will help you refresh answer sheet after time period.
  
 +
Here is a way that we can use to make this solution easily:
 +
# Preparing JavaScript  - Java Script code for questionnaire's Java Script.<syntaxhighlight lang="javascript" line="1">
 +
// IsTestMode : bool
 +
// Parameters: string : eg: &T=1
 +
window.callWF = function(IsTestMode, Parameters){
 +
  if(IsTestMode) document.location = "https://voxmeter.catglobe.com/Login.aspx?r=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&n=2&b=1&Test=1" + Parameters;
 +
  else document.location = "https://voxmeter.catglobe.com/Login.aspx?r=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&n=2&b=1" + Parameters;
 +
}
 +
</syntaxhighlight>Let's copy this code and replace the '''<nowiki/>'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'<nowiki/>''' 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:[[File:Get GUID.png|none|thumb|1431x1431px]]  this screenshot will show you where you paste this script:[[File:Questionnaire js.png|none|thumb|1305x1305px]]  - Java Script code for question's Java Script.
 +
# Adding to questionnaire
 +
# Testing

Revision as of 09:45, 6 July 2017

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