Jump to content
Toggle menu
  • 915 articles
  • 3.8K files
  • 30.2K users
  • 279.2K edits
Catglobe Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Maximum text length: Difference between revisions

From Catglobe Wiki
Cg van (talk | contribs)
No edit summary
Cg van (talk | contribs)
No edit summary
Ā 
Line 11: Line 11:
*I have a Text grid question like below.
*I have a Text grid question like below.


[[Image:MaximumTextLength1.jpg]]
[[Image:MaximumTextLength1.jpg]] Ā 


*I want to set maximum text length.
*I want to set maximum length on text question.


[[Image:MaximumTextLength2.jpg]]
[[Image:MaximumTextLength2.jpg]] Ā 


=== SolutionĀ  ===
=== SolutionĀ  ===
Line 21: Line 21:
*Add a Text grid question to Questionnaire editor like below Ā 
*Add a Text grid question to Questionnaire editor like below Ā 
*Go to menu Properties -> Question scripts -> Java script tab -> Input script
*Go to menu Properties -> Question scripts -> Java script tab -> Input script
[[Image:MaximumTextLength Code.jpg]]
Ā 
[[Image:MaximumTextLength Code.jpg]] Ā 


=== CodeĀ  ===
=== CodeĀ  ===

Latest revision as of 10:22, 16 January 2012

Maximum text length

In order to limit number of characters that respondent input to text box.

As a questionnaire creator

I want to set maximum length on text question.

Example

  • I have a Text grid question like below.

  • I want to set maximum length on text question.

Solution

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

Code

quest.maxlength = 10;

Source

Questionnaire Resource Id on cg site: 159730