help.sitevision.se always refers to the latest version of Sitevision
Text in Question form
A text question is a question in the questionnaire where the participant can enter an answer.
Click on the Add field link to add a field (a question). Select the field type you want to add. You will get different settings depending on the field type you select.
General tab - Field type: Text
Select Field type: Text in the list.
The placeholder and input type setting is unique for the Text field type. There are also some settings that are text specific under the Advanced tab.
Placeholder
Enter placeholder text here. The text disappears as soon as the visitor places the cursor in the input field for the question.
Placeholders can only be used if the website encoding standard is set to HTML5. Placeholders are not supported by Internet Explorer 9 and older.
Input type
Here you can choose the right input type in HTML5 to help the mobile users get the right keyboard.
- Text - common keyboard
- E-mail address - keyboard with @ and .
- Web address - URL keyboard, which has a dot, a forward slash, and usually a .com key.
- Number - numeric keyboard
- Telephone number - telephone keyboard, in addition to numbers, also +, * and #
Depending on the browser, you will also get input support i.e. that the browser verifies that you are entering an @ in e-mail address, http:// in URL, numbers in number and phone number.
Advanced tab
Auto-complete
Tick the Use field name to identify this field box, to use the auto-complete function in the form. If a text field has the same name as a previously completed field, the browser can provide suggestions based on what was previously written. To enable auto-complete, the form must have a special name element. You can enter the following:
- name to enter name.
- given-name to enter first name
- family-name to enter last name
- title to enter title
- organisation to enter organisation name
- street to enter address
- postcode to enter postcode
- city to enter city
- e-mail to enter e-mail address
- phone to enter telephone number
- mobile to enter mobile number
You must not have two fields with the same name element on a page. This can cause a collision problem between questions.
Advanced tab - Other
Validation
Here you can choose to validate the fields that is, make sure the correct thing is filled in the fields. For example, that phone numbers only contain numbers and hyphens, that names do not contain numbers, that e-mail addresses contain @ etc.
- No validation - If this is ticked, the field will not be validated, i.e. the visitor can enter anything in the field. This is the default setting.
- E-mail address - If ticked, you will receive a regular expression to check that the field includes @ and dot to confirm that it is a correct e-mail address.
- Regular expression - If you want to validate other fields, you can fill in a regular expression yourself. Syntax for regular expressions in Java and Introduction to regular expressions in Java
Limit the number of characters
Here you can choose to limit the number characters in a text field. If you set the restriction to 20, the number 20 will be displayed in connection with the field. This will be counted down when the visitor fills out the form.
If the visitor fills in too many characters, the number becomes red and they receive an error message when they click Submit.
Ett textfält i ett formulär är begränsat till 4000 tecken.
The page published: