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 = "CType"))
CType is one of Edit, SingleLineEdit, MultiLineEdit (the default), or Password.
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 multiline edit box is displayed.
A Password input box is ideal for sensitive information. For example, if you type:
SecCode1 "Please enter your security code." style(control(type="Password")) text [1..10];
the interviewing program 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.
This graphic is described in the surrounding text.
In the Routing section
To specify a question’s control type in the routing section, type:
Qname.Style.Control.Type = ControlTypes.Type
Qname is the question name.
Type is a keyword defining the control type, and is either ctEdit, ctSingleLineEdit, ctMultiLineEdit, or ctPassword.
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