# 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:

<table><thead><tr><th>type</th><th width="128">name</th><th>label</th><th>appearance</th><th>required</th><th>relevant</th><th>constraint</th><th>hint</th></tr></thead><tbody><tr><td>begin_group</td><td>page1</td><td>Personal information page</td><td>field-list</td><td></td><td></td><td></td><td></td></tr><tr><td>note</td><td>startnote</td><td>We are conducting a new survey please fill following questions.</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>text</td><td>name</td><td>What is your full name?</td><td></td><td>yes</td><td></td><td></td><td>Enter your first and last.</td></tr><tr><td>integer</td><td>age</td><td>How old are you?</td><td></td><td>yes</td><td></td><td>. >= 0 and . &#x3C;= 120</td><td>Must be between 0 and 120.</td></tr><tr><td>select_one sex</td><td>gender</td><td>What is your gender?</td><td></td><td></td><td>${age} >= 10</td><td></td><td>Select one option.</td></tr><tr><td>end_group</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table>

## 🔑 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](https://docs.ngsurvey.com/projects/import-export/xlsform/survey-sheet/groups) of pages or groups of answers

{% hint style="info" %}
`select_one gender` means the choices come from a list named `gender` (which will be defined in the Name sheet).
{% endhint %}

#### 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

{% hint style="info" %}
The variable name is how the data will referenced when using relevant and constraint features
{% endhint %}

#### 3. Label

This is the question text that the user sees. It supports also [multiple languages](https://docs.ngsurvey.com/projects/import-export/xlsform/survey-sheet/multi-languages) if you need to create a survey in multiple languages (e.g., `label::English`, `label::French`).

{% hint style="info" %}
Be clear and user-friendly. For example: “What is your current job title?”
{% endhint %}

#### 4. Appearance (optional)

The appearance let you control additional properties for each of your item. ngSurvey supports several [appearance options](https://docs.ngsurvey.com/projects/import-export/xlsform/survey-sheet/appearances) for generating rating scales, pages, comment box, masked entries or custom alignments of fields. &#x20;

#### 4. Required (optional)

Set to `yes` if the question or answer must be answered before continuing. If left blank the question is optional&#x20;

#### 5. Relevant (optional)&#x20;

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

> &#x20;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.

> &#x20;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.
