New question

Add a question to the page using the New Question button.

Screenshot: new question button

A new question element is added to the form.

Select the question and complete the fields:

Field Description
Name

The Name of a question or formula is a reference name for the data to be collected, displayed, or calculated by that question. Question names are referenced in data link rules and can be used in reports. Give the question a meaningful name.

Question names must be unique within the page.

Limit the name text to 40 characters, with no spaces or special characters. Must begin with an alphabetic character.

Title A question title is displayed immediately above the question. Typically a question title is used for the first question in a block of questions. Individual questions often do not have titles.
Sub Title

A question sub title is displayed in highlighted text immediately before the question. Typically a question sub title is used for a group of questions forming part of a larger, titled block. Individual questions often do not have sub titles.

Pre Text

Question Pre Text is displayed immediately before the question, and by default on the same horizontal alignment as the question field. Use this to add explanatory information about the question, if required.

Prompt

The question prompt is the question to be answered by the user. Displayed to the left of a question data entry field. Prompts are also used in Option elements to set the text displayed for the option in the picklist, radio button, checkbox or slider.

Limit the prompt text to 80 characters. While the system may allow you to save longer prompts, if you exceed 80 characters, an error message might appear when the form is used.

Question Type

Defines the type of question displayed on the page.

Note

When adding a checkbox or multi-select checkbox question, the standard HTML question types (checkboxhtml, multiselecthtml) are recommended. These use standard HTML elements.

Post Text

Question Post Text is displayed immediately after the question, and by default on the same horizontal alignment as the question field.

Required Checkbox. Makes the question mandatory. Users cannot progress with the form until the question is completed.
Pre Unit Text that is displayed immediately in front of the question response or option. Use, for example, for text entry questions where the user's response forms part of a sentence. For example: "I would improve _____ ."
Post Unit Text that is displayed immediately after the question response or option. Use, for example, if the user's response forms part of a sentence. See Pre Unit.
Minimum Text Used for the Slider question type. The text that is displayed at the lower end of the scale.
Maximum Text Used for the Slider question type. The text that is displayed at the higher end of the scale.
Help Adds a question mark icon beside the question prompt, which users can hover over to view the help text you enter. Use to provide explanatory information to the user about this question.
Default

The default text that shows in text entry fields, or the name of the default option selected. Leave blank for none.

  • For text entry fields, enter the value that will be shown by default when the question is displayed.

  • For checkboxes, enter True to select the checkbox by default.

  • For dates, enter a date in YYYY-MM-DD format.

  • For selectable options such as checkboxes, option buttons, or slider values, enter the Value of the option as defined in the option element.

Maximum Words Used for the textarea and textarearesize question types. When used, a word count is displayed on the page. If the user enters more than the set number of words, an error is displayed when the form is submitted.
Maximum Characters The maximum number of characters that will be stored when the form is submitted.
Width Defines the approximate width of the text entry field in text characters.
Height For a textarea and textarearesize, height defines the number of lines of text can be entered before the text area scrolls or resizes.

Question types

Note

When adding multi-select lists and checkboxes, we recommend you use the checkboxhtml and multiselecthtml question types, which use standard HTML elements.

Field Description
text A text field, allows the user to enter free text.
checkbox Deprecated.
checkboxsmall

Deprecated.

checkboxhtml

A standard HTML checkbox.

Tip

If using a binary yes/no question, use a select drop-down menu with "yes" and "no" as options. This appraoch is simpler for reporting purposes.

select

A drop-down list. Requires option elements to be created.

Tip

If you need to create a drop-down list with many options, such as a country list, a shortcut is to add these to the form definition XML directly. See Configuring long picklists.

multiselect Deprecated.
multiselecthtml

A list of standard HTML checkboxes. Users can select more than one option. Requires option elements to be created.

radio Option buttons. Users can select only one option. Requires option elements to be created.
radiovertical Option buttons. Users can select only one option. Requires option elements to be created. Requires option elements to be created. Functionally identical to the radio question option.
radiohorizontal Option buttons displayed as a horizontal row. Requires option elements to be created.
textarea

A resizable text field, allows the user to enter free text. Users can drag the corner of the box to enlarge it.

textarearesize A large text field. Note: this text box cannot be resized. Use textarea if you want users to be able to resize the text area field.
date

A date field with a date picker. Users can enter a date in the format YYYY-MM-DD or click to select a date using a drop-down calendar.

slider

A graphical slider, allowing users to select a value on a scale. Requires option elements to be created.

readonly A read-only text value. Can be used to display non-editable information to the user.
file Allows users to upload a file to attach to the form.

Advanced settings

Field Applies to Description
ID

All (except readonly)

 

A unique ID for the element.
Conditions All The condition that must be met for this question to be displayed on the page. For example, you can make a question conditional on the answer given for a previous question.
Dual Entry Text For text fields. Enable this to require the user to input the text twice. The text must be identical in both fields to pass validation. Useful for collecting important information such as an email address.
Validation Text Validation allows you to add rules that check the information entered in the field, and display an error if the entry does not match. For example, you can validate that the string entered is in the form of an email address, or is a number. See Validation.

Minimum Value

Maximum Value

Date

For the Date question type. Allows you to specify minimum and maximum dates that can be selected using the date picker.

Specify a number of days, months, or years in the past or future from today's date. For example, to specify that the minimum date that can be selected is 65 years in the past, enter -70Y.

Use the following format:

[+ or -] [value] [Y, M, or D]

  • Use minus (-) to specify a date in the past, or plus (+) to specify a date in the future.

  • Specify the number of days, months or years as a digit.

  • Use Y, M, or D to specify whether the value is in years, months, or days.

For example, to allow a date range of 70 years in the past to 6 months in the future, use:

Minimum Value: -70Y

Maximum Value: +6M

Year Range Date

Specify a range of years that can be selected in the date picker. Colon separated. For example, to specify that users can select years between 2020 and 2025, enter:

2020:2025

You can also specify a number of years in the past and future, in the format:

-75:+4

Note: Use either the minimum and maximum value fields, or enter a year range for dates. Do not specify both.

Note

It is not possible to change the format of a date field in the form definition. Dates are always in the format YYYY-MM-DD.