A Text - Single Line question is a text field that provides a single line of input.

The following is an example of a Text - Single Line question:

First Name:

The following fields are specific to this question type and give you additional control over the display and behavior of this field:

Text Format

Although the value of a text field is entered manually by the user, you can define the required format of the text.

1. Text
 
The user will be able to enter any value.
2. Integer
 
The text must be a numeric value without a decimal component.

Note: If the format is Integer and the user enters a decimal value when filling out the form, the value will be accepted, but the decimal portion will be truncated, meaning that the number will not be rounded.

3. Decimal
 
The text can be either integer or decimal. You will also need to specify the number of decimal places to store in the database.

Note: If the format is Decimal and the user enters more decimal digits than are supported by the field, the value will be accepted, but the decimal portion will be rounded to the number of decimal places defined by the form manager.

Note: If the format is Integer and the user enters a decimal value when filling out the form, the value will be accepted, but the decimal portion will be truncated, meaning that the number will not be rounded. If the format is Decimal and the user enters more decimal digits than are supported by the field, the value will be accepted, but the decimal portion will be rounded to the number of decimal places defined by the form manager.

Text Options

1. Size
 
The size of the text field as it appears on the form.
2. Maxlength
 
The maximum number of characters that the user can enter for this field.
3. Unique
 
If checked, all responses must have unique values. The only exception is if the field is not required and the response is left blank by the end user.
4. Password
 
This will hide the input from the user, replacing anything that is typed with the asterisk (*) character.
5. Default
 
The value that will appear in the text field when the user first sees the form.
6. Text Before
 
The text that will appear immediately to the left of the text field.
7. Text After
 
The text that will appear immediately to the right of the text field.
8. Hidden
 
The field will be hidden from all users, and the Default value will be used as the value when the form is submitted.
9. Allow Pre-Fill
 
By default, the value of text fields can be passed on the querystring into the form as default values to be used when the user first loads the form. With hidden text fields, however, this can cause problems if the value cannot change. If you want to enable the value of a hidden field to be provided on the querystring, this option must be enabled; otherwise the value on the querystring will be ignored and the default value provided by the form manager will be used instead.
10. Type
 
If an option is selected here, the value that the user enters for this question will be validated against specific rules.

If the value is "None" you will have access to the fields in the following section (Advanced); otherwise, those fields will not be accessible.

Note: Only Administrators can manage entries in the Type drop-down list. For more information, see the Add a Text Type help file.

Advanced

Note: The following fields are for advanced users only. If you have not heard of regular expressions or do not understand how to implement them, you may ignore this section completely. If you would like information regarding the use of regular expressions, click here.

1. Must Match
 
This field accepts regular expressions, one per line, which will be checked when the user submits the form. If the user's answer does not match at least one of the regular expressions, the value of the Error Message field will be shown to them.
2. Cannot Match
 
This field accepts regular expressions, one per line, which will be checked when the user submits the form. If the user's answer any of the provided regular expressions, the value of the Error Message field will be shown to them.
3. Match All
 
If enabled, the user input will have to match each individual regular expression. In the case of Must Match expressions, all must be matched for the input to be valid. In the case of Cannot Match expressions, all must be matched for the input to be invalid. If the option is not enabled, only one expression must be matched for the input to be be valid or invalid.
4. Label
 
This will appear above the text field and can be used to provide users with additional information regarding the required format of the field. For example, if you have a regular expression for matching phone numbers, you can include a label that reads "nnn-nnnn".
5. Error Message
 
By default, a standard error message will be provide when the input does not match the required input. If you would like to provide a custom error message, you can do so using this field.