Difference between revisions of "Change text box size"

From Catglobe Wiki
Jump to: navigation, search
(Change Text box size)
Line 1: Line 1:
== Change Text box size ==  
+
== Change Text box size ==
You want to change the text box size  in a Text question .The script is often used together with the Maximum text length script
 
  
In order to make text box wider.
+
You want to change the text box size in a Text question .The script is often used together with the Maximum text length script
  
As a questionnaire creator
+
In order to make text box wider.
 +
 
 +
As a questionnaire creator  
  
 
I want to change text box size  
 
I want to change text box size  
  
'''Example'''
+
'''Example'''  
*I have a Text grid question like below.  
+
 
 +
*I have a Text grid question like below.
 +
 
 +
[[Image:ChangeTextBoxSize1.jpg]]
 +
 
 +
*I want to change text box size.
 +
 
 +
[[Image:ChangeTextBoxSize2.jpg]]
  
 +
=== Solution  ===
  
*I want to change text box size.
+
*Add a Text grid question to Questionnaire editor like below
 +
*Go to menu Properties -> Question scripts -> Java script tab -> Input script
  
=== Solution ===
+
[[Image:ChangeTextBoxSize Code.jpg]]
  
*Add a Text grid question to Questionnaire editor like below
+
=== Code  ===
*Go to menu Properties -> Question scripts -> Java script tab -> Input script
 
  
=== Code ===
+
<source lang="javascript">
<source lang="javascript" line="1">
 
 
quest.size=50;
 
quest.size=50;
</source>
+
</source>  
  
=== Source ===
+
=== Source ===
  
 
Questionnaire Resource Id on cg site: 159730
 
Questionnaire Resource Id on cg site: 159730

Revision as of 10:29, 16 January 2012

Change Text box size

You want to change the text box size in a Text question .The script is often used together with the Maximum text length script

In order to make text box wider.

As a questionnaire creator

I want to change text box size

Example

  • I have a Text grid question like below.

ChangeTextBoxSize1.jpg

  • I want to change text box size.

ChangeTextBoxSize2.jpg

Solution

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

ChangeTextBoxSize Code.jpg

Code

quest.size=50;

Source

Questionnaire Resource Id on cg site: 159730