Difference between revisions of "Double columns in text grids"

From Catglobe Wiki
Jump to: navigation, search
m (Double columns in a Text grid)
 
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Include the following Javascript
+
== Double columns in Text grid  ==
  
<code>
+
In order to show text grid question in two columns.
quest.gridcolumns[0] = "Text 1";<br/>
+
 
quest.gridcolumns[1] = "Text 2";
+
As a questionnaire creator
</code>
+
 
 +
I want to show text fields of a text grid or answers options of single/multi grid in more than one column
 +
 
 +
'''Example'''
 +
 
 +
*I have a Text grid question like below.
 +
 
 +
[[Image:DoubleColumnInTextGrid1.png]]
 +
 
 +
*I want to show text grid question in two columns.
 +
 
 +
[[Image:DoubleColumnInTextGrid2.png]]
 +
 
 +
=== Solution  ===
 +
 
 +
*Add a Text grid question to Questionnaire editor like below
 +
*Go to menu Properties -&gt; Question scripts -&gt; Java script tab -&gt; Input script
 +
 
 +
[[Image:DoubleColumnInTextGrid_Code.png]]
 +
 
 +
=== Code ===
 +
 
 +
<source lang="javascript">
 +
//Include the following Javascript
 +
 
 +
quest.gridcolumns[0] = "Personal information";
 +
quest.gridcolumns[1] = "Company information";
 +
</source>
 +
 
 +
=== Source ===
 +
Questionnaire Resource Id on cg site: 159730

Latest revision as of 09:05, 11 January 2012

Double columns in Text grid

In order to show text grid question in two columns.

As a questionnaire creator

I want to show text fields of a text grid or answers options of single/multi grid in more than one column

Example

  • I have a Text grid question like below.

DoubleColumnInTextGrid1.png

  • I want to show text grid question in two columns.

DoubleColumnInTextGrid2.png

Solution

  • Add a Text grid question to Questionnaire editor like below
  • Go to menu Properties -> Question scripts -> Java script tab -> Input script

DoubleColumnInTextGrid Code.png

Code

//Include the following Javascript

quest.gridcolumns[0] = "Personal information";
quest.gridcolumns[1] = "Company information";

Source

Questionnaire Resource Id on cg site: 159730