Maximum text length

From Catglobe Wiki
Revision as of 11:22, 16 January 2012 by Cg van (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.

MaximumTextLength1.jpg

  • I want to set maximum length on text question.

MaximumTextLength2.jpg

Solution

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

MaximumTextLength Code.jpg

Code

quest.maxlength = 10;

Source

Questionnaire Resource Id on cg site: 159730