Survey Sheet

The Survey sheet is the heart of your XLSForm. It’s where you define the questions that will be asked in your form, their types, labels, names, and logic such as skips, relevance, and constraints.

Each row in the survey sheet represents a question, a note, or a group. Each column provides information about how that question behaves.

Here's a simple example of how it might look:

type
name
label
appearance
required
relevant
constraint
hint

begin_group

page1

Personal information page

field-list

note

startnote

We are conducting a new survey please fill following questions.

text

name

What is your full name?

yes

Enter your first and last.

integer

age

How old are you?

yes

. >= 0 and . <= 120

Must be between 0 and 120.

select_one sex

gender

What is your gender?

${age} >= 10

Select one option.

end_group

🔑 Key Columns Explained

  1. Type This defines what kind of question you are asking. Common types:

  • text – for text input

  • integer or decimal – for numbers

  • select_one list_name – for single choice questions

  • select_multiple list_name – for multiple choice questions

  • note – to display static text

  • begin group / end group – to organize questions into groups of pages or groups of answers

select_one gender means the choices come from a list named gender (which will be defined in the Name sheet).

2. Name

This is the variable name used internally. It should be:

  • short and descriptive

  • lowercase, no spaces or special characters

  • unique within the form

The variable name is how the data will referenced when using relevant and constraint features

3. Label

This is the question text that the user sees. It supports also multiple languages if you need to create a survey in multiple languages (e.g., label::English, label::French).

Be clear and user-friendly. For example: “What is your current job title?”

4. Appearance (optional)

The appearance let you control additional properties for each of your item. ngSurvey supports several appearance options for generating rating scales, pages, comment box, masked entries or custom alignments of fields.

4. Required (optional)

Set to yes if the question or answer must be answered before continuing. If left blank the question is optional

5. Relevant (optional)

Used for skip logic. The question only shows if the condition is met.

Example: relevant: ${age} >= 18 The question will only appear if age is 18 or older.

6. Constraint (optional)

Used to validate answers using logic if the answer is based on a text entry.

Example: . >= 0 and . <= 100 This ensures the input is between 0 and 100. The . represents the current question's answer.

7. Hint (optional)

Help text shown as a ? tooltip to the user to explain what’s expected when it gets hovered on.

Last updated

Was this helpful?