Desktop User Guides > Professional > Interview scripting > Writing interview scripts > Page layout facilities > Styles > Input boxes for numeric, text, date, and other specify responses > Types of text input boxes
 
Types of text input boxes
Text input boxes normally show six rows of 34 characters each, and respondents can scroll to enter more text if necessary. You can replace this with a single-line box that scrolls to the right as the respondent types. If the script prompts respondents for sensitive information such as a password or account number, you can request a single-line box that displays dots instead of the characters the respondent types.
The display method is referred to as the Control Type and is defined using the control keyword in the metadata section or the question’s Control.Type property in the routing section.
In the metadata section
To determine the type of text input box displayed, place the following after the question text:
style(control(type = "{Edit|SingleLineEdit|MultiLineEdit|Password}"))
The default value is MultiLineEdit.
An Edit box is a text input box whose dimensions vary automatically according to the expected length of the text. If the expected length is 40 characters or fewer, a single-line box is displayed; if the expected length is greater than 40 characters, an multi-line edit box is displayed.
A Password input box is ideal for sensitive information. The following example draws a single-line input box and displays the respondent’s security code as one dot for each character typed. The security code appears in the data file exactly as the respondent typed it:
SecCode1 "Please enter your security code." style(control(type="Password")) text [1..10];
This graphic is described in the surrounding text.
In the Routing section
To specify a question’s control type in the routing section, type:
<question_name>.Style.Control.Type = ControlTypes.{ctEdit|ctSingleLineEdit| ctMultiLineEdit|ctPassword}
where <question_name> is the question name.
The previous example could be specified in the routing section as:
SecCode.Style.Control.Type = ControlTypes.ctPassword
See also
Input boxes for numeric, text, date, and other specify responses