Toggle menu
876
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Number grid: Difference between revisions

From Catglobe Wiki
No edit summary
Cg van (talk | contribs)
No edit summary
Line 1: Line 1:
-Challenge
== Turn a text grid question into a number grid  ==
User want to turn a text grid question into a number grid  
 
In order to use a number grid question
 
As a questionnaire creator
 
I want to turn a text grid question into a number grid  
 
=== Solution ===
 
*Add a Text grid question to Questionnaire editor like below
*You can use question property instead of using java script. <br>


-You can use question property instead of using java script.
<br>
[[Image:NumberGrid.JPG]]  
[[Image:NumberGrid.JPG]]  
-Code
var maxSQ = quest.questions.length;


for(var i = 0; i maxSQ; i++)
*Go to menu Properties -> Question scripts -> Java script tab -> Input script
 
=== Code ===
 
<source lang="javascript">
var maxSQ = quest.questions.length;
 
for(var i = 0; i maxSQ; i++)  
 
   quest.questions[i].answertype = 2;
   quest.questions[i].answertype = 2;
</source>
=== Source ===
Questionnaire Resource Id on cg site: 159730

Revision as of 10:15, 10 January 2012

Turn a text grid question into a number grid

In order to use a number grid question

As a questionnaire creator

I want to turn a text grid question into a number grid

Solution

  • Add a Text grid question to Questionnaire editor like below
  • You can use question property instead of using java script.

  • Go to menu Properties -> Question scripts -> Java script tab -> Input script

Code

var maxSQ = quest.questions.length; 

for(var i = 0; i maxSQ; i++) 

  quest.questions[i].answertype = 2;

Source

Questionnaire Resource Id on cg site: 159730