Text Variable

A Text variable allows you to enter a single line of text in the questionnaire, ideal for short responses like names or titles.
  • Question
    : This is the question we want to ask the user. It typically specifies the question text displayed on the questionnaire shown to end users.
  • Guidance
    : This specifies the guidance text that appears below the question in the questionnaire. It also supports rich text formatting using the controls above the text box.
    note
    If you want to make a specific question compulsory for the user, check the
    Answer required
    box. Required questions display a red asterisk and prevent submission until they are answered.

Advanced settings

This section is divided into three different categories. On the Questionnaire, lists questions and input fields shown to end users in Author Online to collect structured feedback or data, which may vary by content type. The document outlines the values that will be included in the final document generated after the questionnaire is completed and the template is assembled. Repeated groups help authors organise content that could be repeated.

On the Questionnaire

  • Default Value
    : Default values are pre-filled entries that appear in questionnaire fields when accessed for the first time. You can later type these values manually in the edit boxes or derive them using expressions in the questionnaires. When setting a default value for a text variable, it must be enclosed in double quotes.
    If a variable remains unanswered, because the user removed the default or skipped the relevant questionnaire page, the default value will not appear in the final document. This ensures only confirmed user inputs are included.
  • Min. character length
    : Must be a positive whole number representing the minimum number of characters allowed in the questionnaire.
  • Max. character length
    : Must be a positive whole number representing the maximum number of characters allowed in the questionnaire. The text box will prevent the user from entering more characters than the specified value for this attribute.
  • Trim leading and trailing spaces
    (applicable only for text variables): When this option is enabled, any leading and trailing space characters will be automatically removed from the text that is entered into the questionnaire. It is particularly useful when the corresponding field in the document has punctuation on either side.

In the Document

Default case

The default case specifies the casing of variable values in a generated document when no local case is defined. The available options are:
Format Option
Description
Capitalize Each Word (capitals)
The first letter of all words will appear capitalised in the generated document.
Uppercase (upper)
All letters will appear in uppercase in the generated document.
Lowercase (lower)
All letters will appear in lowercase in the generated document.
As entered
All letters will appear as they are entered on the questionnaire in the generated document.
Title case (proper)
The first letter of all major words will be capitalised in the generated document.
First letter capitalize (firstletter)
The first letter of each word will be capitalised in the generated document.
If no default case is selected, the value will be generated as entered in the questionnaire, by default.
For detailed instructions, see Field format and case overview.

Mask

A
Mask
is a pattern applied to a variable that enforces a specific input format in the questionnaire. It ensures that users enter information in the required structure before they can continue, helping maintain data accuracy and consistency.
Masks can be either be:
  1. a pre-defined mask
  2. Custom mask
They control both the
type
and
format
of characters a user can enter, such as letters, numbers, or special characters. If the user's input does not match the mask, the questionnaire will not proceed. For example, if you need to capture an
ISIN number
, which consists of two uppercase letters followed by eight digits, you can apply the following mask:
AA########
In this mask, each symbol represents an allowed character type:
  • A
    represents an uppercase letter (A–Z)
  • #
    represents a digit (0–9)
With this mask applied, the user must enter exactly two uppercase letters followed by eight digits. Any other format will be rejected.
The available pre-defined mask options are:
Pre-defined masks
Description
Telephone number (telephone)
The user must enter a valid telephone number consisting of digits (0–9), spaces, or hyphens, with an optional leading plus (+) and optional matching parentheses.
Email address (emailaddress)
The user must enter a valid email address. Any sequence of characters that contains at least one at (@) character and at least one dot (.) character.
Web address (webaddress)
The user must enter a valid email address. Any sequence of characters that contains at least one dot (.) character.
UK postcode search (searchaddress)
Enables the UK postcode search in the questionnaire by displaying a
Search for address
button below the text field.
note
This feature works only when
en‑GB
is set as the template's base locale.
Company search (searchcompany)
Enables the Companies House search feature by displaying a
Search Companies House
button next to the text field in the questionnaire.
note
This works only when the base locale is
en‑GB
(UK companies),
nl‑NL
(Netherlands companies), or when /en‑GB or /nl‑NL is manually added to the mask for templates using a different base locale.
Password field (password)
The edit box contains bullet characters for every character typed by the user.
note
The password is only masked in the questionnaire, but in the Document History, it is recorded in plain text.
Alternatively, you can create a custom mask by selecting the
Create new
option from the dropdown list. The newly created mask will be automatically selected by default, without the need to select it manually and will be updated as the most recent. If any mask is modified, it will be re-ordered to appear with the most recently modified status in the dropdown.
Prevent line breaks
When the option is checked, the information appears on a single line, separated by commas (if multiple), instead of being displayed as a list.

Related Content