Formwork
Menu
Get started free Log in

Text, number, date and time questions

Short and long text, email, website, phone, number, date and time, plus validation rules, custom error messages and the unique-answer option.

The types

TypeWhat it collectsLimit or check
Short textA single lineUp to 500 characters
Long textSeveral linesUp to 10,000 characters
EmailAn email addressMust look like name@example.com, up to 254 characters
WebsiteA web addressA bare domain such as example.com is saved as https://example.com. Up to 2,000 characters
PhoneA phone numberDigits with an optional +, spaces, brackets, dots and hyphens; 6 to 15 digits. The error message asks for a country code
NumberA numberWhole or decimal. A comma decimal separator such as 12,5 is read as 12.5
DateA dateStored as YYYY-MM-DD
TimeA time of dayStored as HH:MM on a 24-hour clock

All of these checks run on the server as well as in the browser, so a respondent cannot bypass them by editing the page.

Text is cleaned before it is stored: control characters are removed, and in short-text types runs of whitespace are collapsed to one space.

Settings on the card and in the panel

Select a question to see its settings panel on the right.

  • Required is on the card and in the panel under Basics.
  • Placeholder shows a hint inside the field (up to 120 characters). It is offered for short text, long text, email, website, phone and number.
  • Help text appears under the question and accepts light Markdown.
  • For a Date question, Allowed dates has Earliest and Latest. A date outside the range is refused with a message that starts "Pick a date on or after" (or "on or before", or "between") and names the limit.

Validation rules

Under Validation in the panel you choose a kind of rule, then an operator.

KindOperatorsAvailable on
NumberGreater than, Greater than or equal to, Less than, Less than or equal to, Equal to, Not equal to, Between, Not between, Is a number, Is a whole numberNumber and Short text
TextContains, Does not contain, Is an email address, Is a web addressShort text, Long text, Website and Phone
LengthMaximum characters, Minimum charactersEvery type above
PatternMatches pattern, Does not match patternEvery type above

For the operators that need a value, a field appears next to the operator, and Between and Not between take two values. Error message is what the respondent sees under the answer. Leave it empty and Formwork writes a specific default, for instance "Enter a number from 1 to 10."

A pattern is a regular expression written without delimiters, up to 200 characters, for example ^[A-Z]{2}\d{6}$ for two capitals and six digits. Patterns are checked against at most the first 2,000 characters of an answer. If a pattern cannot be compiled, the rule is skipped rather than blocking every submission.

Answer must be unique

Under the validation settings, Answer must be unique rejects a value that someone has already submitted. Use it for things like a membership number or a username. Matching ignores case and extra spaces, and only submitted responses count, so an unfinished draft does not reserve a value. The respondent sees "That answer has already been used. Try a different one."

Text answers in quizzes

Text questions can carry an answer key of Accepted answers, one per line, and number-like questions use Correct value with Tolerance. See Building a quiz.

Plans

All types on this page are available on every plan. Types that need a paid plan are described in Choices, ratings and grids and Uploads, signatures, addresses and layout blocks.

Updated Sep 30, 2026