← Back to Survey
User Guide
Question Types & Features
Analysis & Settings

Single Line Text

Single Line Text is the most basic type of question, seen in every survey. Works best for obtaining respondents' information such as names, E-mail addresses and telephone numbers.

SurveyCake's Single Line Text question type offers not only the common features found in all question types, such as Required, Note, Add Media, Indent, Style, Hide, and Timer, but also Input Settings including 5 types of Text Validation and Custom Placeholder Text. These features guide respondents in providing answers that adhere to the specified format. If an answer does not meet the validation format, the system will display a corresponding warning reminder and prevent the submission of incorrect data. Text Validation not only ensures data accuracy but also enhances convenience for respondents when filling in their answers.

Single Line Text question displaying a warning reminder that blocks submission of invalid data
Text Validation format dropdown listing the five supported types: text, email, phone number, URL, and API

Currently, Text Validation supports validation for 5 types of input formats: text, email, phone number, URL, and API. They will be introduced in order below.

1. Text

If you would like to collect answers consisting of text only or a combination of "text and numbers" (e.g. a student ID consisting of 7-9 alphanumeric characters), you can enable the general text validation and set the required number of characters within a specific range. In this way, before answering, the question will display a default guiding message "Input text here" and it can also block all answers that do not meet the specified conditions. The number of characters can be limited within a specific range.

Text Validation format settings with a default guiding message and character length range
Single Line Text question showing the default 'Input text here' placeholder text
Text Validation setting with the format set to Phone Number

2. Phone Number

If you would like to collect respondents' phone numbers, you can set the validation to phone number so that only answers in a numeric format can pass the validation.

Furthermore, you can specify the answer to start with 09, and the length of the answer to be between 10 and 10 characters, for example, as phone numbers typically have a fixed format.

Phone Number validation rule requiring answers to start with 09 and be exactly 10 digits
Before answering, the input field shows the default placeholder text 'Please enter text'
When the answer length doesn't match the set range, the system shows a reminder and blocks submission
Mobile numeric keypad automatically appearing for a Phone Number validated question

The numeric keypad will automatically appear on the mobile devices when the text validation is set as Phone Number.

Respondent typing a phone number on mobile with the numeric keypad displayed

3 & 4. Email & URL

To collect answers such as email or website addresses, you can utilize the Text Validation feature by setting it to "email" or "URL". This will display relevant default guidance text and ensure that only valid email addresses or website URLs are accepted.

Text Validation format setting configured to Email with the default guidance text shown
Text Validation format setting configured to URL with the default guidance text shown

The corresponding keypad will automatically appear on the mobile devices when the text validation is set as Email or URL.

Mobile keyboard automatically adjusting to match the Email or URL validation format
Mobile keyboard automatically displaying the @ symbol while answering an Email-validated question

5. API

You also have the option to integrate your custom API into the survey, and the real-time response from the API will be displayed on the page. Additionally, you can utilize the API results to determine whether the question validation has passed. For more detailed information, please refer to the API.

Single Line Text question with API validation showing the real-time API response on the page

FAQ

  • Can Skip Logic and Conditional Branching be applied to Single Line Text?

No, currently Skip Logic and Conditional Branching only can be applied to Multiple Choice and Checkboxes and other question types are not available yet.

Summary

Facilitate the experience of filling out surveys by setting Text Validation in Single Line Text. Keep this tip in mind when designing your next survey!

Master advanced
survey skills now!

Learn More
Can't find the answer you're looking for?