# Building the form (/docs/survey-apps/build-the-form)



The form is built on the editor's **Questions** page. Open the survey, choose **Open
editor**, and it is the first page in the bar at the top. Building needs the **App
builder** or **Admin** role on the survey; anyone else who can open the editor sees the
form read-only.

Everything you change here goes into the survey's **draft**. Respondents keep
answering the published form until you publish again - see
[Publishing and versions](./publish-and-versions.mdx).

## The Questions page [#the-questions-page]

The page is a canvas laid out the way a respondent will read the form:

* the **form card** at the top, with the form's title and description;
* one card per **page** (Factophant calls a page a **section**), each holding the
  cards of its questions;
* an **outline** of the whole form on the left, which you can search with
  <kbd>/</kbd> and fold away with the button above the canvas or <kbd>mod</kbd> + <kbd>\\</kbd>
  (<kbd>Command</kbd> on a Mac, <kbd>Ctrl</kbd> elsewhere);
* a **panel** on the right, which opens with the settings of whatever you click.

Click a card to select it and open its panel; click it again, or press Escape, to
close the panel. Point at a card for its actions: drag it by the grip to move it (a
question can be dragged onto another page, and a page between other pages),
**Duplicate** it, or delete it.

### The form card [#the-form-card]

Select the form card to set what a respondent sees at the top of every page:

* **Form title** - a new survey takes the app's name; changing it later leaves the
  app's name alone.
* **Description** - optional, under the title.
* **Show progress** - shows "Section n of N" and the page dots to respondents. It is
  on for a new survey.

### Pages [#pages]

A long form reads better a page at a time. Add a page with the **Section** button
under the last page; the new page starts after everything already on the form.
Select a page's card to give it a **Page title** and an optional **Page description**,
to see its questions listed, and to move it with **Move up** and **Move down**.
**Delete section** removes the page break; its questions join the page before it.

A form can have up to 20 pages, and 100 rows in total counting questions and page
breaks together. Both are workspace limits - see
[The limits a survey works inside](./share-and-collect.mdx#the-limits-a-survey-works-inside).

## Adding a question [#adding-a-question]

Add a question with the **Question*&#x2A; button at the foot of the page it belongs on,
or the &#x2A;*+** beside that page in the outline. You pick its type first, from
**Add a question**, and it is inserted after the selected question (or at the end of
the page). Select it to write it in the panel:

* **Question** - what the respondent reads. Every question needs text before the
  form can be published.
* **Help text** - an optional line under the question.
* **Required** - the respondent cannot finish the page without answering it.

## Question types [#question-types]

The type decides what the respondent gets, and how the answer is stored.

| Type                | What the respondent gets                                    |
| ------------------- | ----------------------------------------------------------- |
| **Short answer**    | One line of free text                                       |
| **Paragraph**       | A box for a paragraph or more                               |
| **Number**          | A number field, with an optional unit and range             |
| **Single choice**   | One option from a list, all shown at once                   |
| **Multiple choice** | Any number of options from a list                           |
| **Dropdown**        | One option picked from a drop-down list                     |
| **Yes / No**        | A single yes or no                                          |
| **Scale**           | A row of numbered buttons, with labels at each end          |
| **Date**            | A calendar day                                              |
| **Email**           | A field that only accepts a valid email address             |
| **File upload**     | A button that attaches one file                             |
| **Table**           | A grid of columns you define, with rows the respondent adds |

A free-text answer, in any of the text types, can be up to 4,000 characters.

### Number [#number]

**Unit** is shown beside the field, for example km or hours. **Smallest accepted** and
**Largest accepted** set a range the answer must fall inside, and **Decimal places**
decides how precisely it is stored - zero stores whole numbers.

### Scale [#scale]

A scale runs **From** 0 or 1 **To** a high end between 3 and 10. Give each end a label
(**Label at the low end**, **Label at the high end**) so a respondent knows which way
round it goes.

A **Preset** fills both for you: **Agreement** (1 to 5, "Strongly disagree" to
"Strongly agree"), **Satisfaction** (1 to 5, "Very dissatisfied" to "Very satisfied")
or **Recommendation** (0 to 10, "Not at all likely" to "Extremely likely"), in your
language. You can still change any bound or label afterwards.

**Colours in results** says which end is the better one: **Neutral** (the default),
**Higher is better** or **Lower is better** - the last for statements such as "I often
feel burned out". The row of numbered swatches under it shows the colouring you chose.
It takes effect when you publish.

### Single choice, Multiple choice and Dropdown [#single-choice-multiple-choice-and-dropdown]

Write the **Answer options** in the order respondents should see them, up to 50 per
question. A choice question needs at least one option, and every option needs a label.

**Allow another answer** adds an Other choice with a text box, under the label you
give it. Other catches outliers in a list you have already thought through - it does
not recover a category you forgot, so it is worth reading what people typed. Decide
before you publish: once a question has answers, Other can no longer be switched on
or off.

### Follow-up questions on a Multiple choice [#follow-ups]

A **Multiple choice** question can ask more under each option the respondent ticks:
"Which energy sources does this site use?" can ask **Annual consumption** for every
source picked. In the question's **Follow-up questions** group choose **Add follow-up**
and write the question once - the form shows it under each option's name. For each
follow-up choose:

* **Answer type**: **Number**, **Short answer** or **Paragraph**.
* **Ask for**: **Every picked option**, or **Only** one option - "Installed capacity"
  only for Solar, say. An option you have just added can be chosen once the question is
  saved.
* **Unit**, for a number: **No unit**, the **Same unit for every option**, or **A
  different unit per option** - one small field per option. An option you leave empty
  has no unit, and the hint names those options.
* **Required**: a required follow-up must be answered for each option it is asked for.

**Respondent sees** on each card shows how the follow-up will read for one option,
for example **Electricity** › Annual consumption (kWh). With two or more follow-ups an
**Order** setting decides whether the form asks option by option (everything for
Electricity, then Natural gas) or question by question (consumption for every option,
then the supplier). A question can have up to ten follow-ups.

Unticking an option hides its follow-ups, and their answers are not sent. Each answer
is stored with the option it belongs to, and the responses grid and the CSV export
give every option and follow-up its own column.

### Table [#table]

A **table** question is the one to reach for when the answer is a list: "tell us about
each of your suppliers", "list the sites this applies to". Under **Columns** you
define up to ten columns, each with a **Column header**, an answer type (**Short
answer**, **Paragraph**, **Number**, **Date** or **Email**) and an optional **Required**
switch, which means a row somebody started has to fill that column in. The respondent
adds a row per supplier, up to fifty.

### File upload [#file-upload]

A **file upload** question asks for a document: a certificate, a signed form, a
photograph. The respondent attaches one file per question, up to the workspace's
per-file limit (10 MB unless an administrator has changed it). Under **Accepted files**
you choose what they may attach - **Any file**, **Documents** (pdf, doc, docx, xls,
xlsx, csv, txt) or **Images** (png, jpg, jpeg, gif, webp) - and that choice narrows the
file picker they see. It is a guide for them rather than a security check, and you can
change it at any time.

<Callout type="warn" title="Files arrive from strangers">
  A survey link can be shared with anybody, and Factophant does not scan what is
  uploaded for viruses or look inside it. A file is always downloaded rather than
  opened in your browser, so nothing runs by being listed - but treat what arrives
  the way you would treat an email attachment from somebody you do not know.
</Callout>

## Showing a question only sometimes [#conditions]

A question can be **conditional**: shown only when earlier answers say it applies. In
the question's **Visibility** group choose **Add a condition**, then build **Show when**
from a question, a comparison and a value. Add more conditions with **Add a condition**
(up to five) and choose whether **any** or **all** of them must be true. Removing the
last condition makes the question **Always shown** again.

* A condition can test a **Number**, **Single choice**, **Dropdown** or **Yes / No**
  question that comes earlier in the form.
* A choice or yes / no question **is** or **is not** a given answer.
* A number **equals**, **does not equal**, **is greater than**, **is at least**, **is
  less than**, **is at most** or **is between** two values (both ends included), for
  example "Employees is at least 50" or "Night-shift workers is between 1 and 10".
  Decimals, negative numbers and zero all work; type them the way your language writes
  them (2,5 in German, 2.5 in English).
* Any of them **is answered** or **is not answered**.
* A condition that is not finished yet - a number not typed, a range with one end
  missing - is marked on its row and stops the survey from being published until it is
  fixed.
* While a question is hidden it is never required, and any answer to it is dropped
  rather than stored - so a respondent who changes an earlier answer cannot leave a
  stray answer behind.

The question's card on the canvas spells the rule out, for example "Shown when
Employees ≥ 50 or Hazardous materials is Yes".

## Where each answer is stored [#where-each-answer-is-stored]

The **Responses dataset** group at the foot of a question's panel shows where its
answers end up: the **Column name** the question has in the responses grid and the
CSV export, and its **Column type**. A choice question that allows another answer also
names its **Other text column**, which holds what people typed; a table question lists
one column per table column instead. The column name is set by Factophant and is fixed
once the question has answers. [The data behind a survey](./survey-data.mdx) explains
the tables themselves.

## Moving, duplicating and deleting [#moving-duplicating-and-deleting]

Reorder questions and pages by dragging, on the canvas or in the outline. Moving a
question to another page never affects its answers.

Deleting a question that nobody has answered removes it completely. Deleting one that
**has** answers archives it instead: its answers and its column are kept, and it stops
appearing on the form the next time you publish. A question with answers carries a
**Has responses** badge, and some of its settings are fixed - see
[Editing a survey people are answering](./publish-and-versions.mdx#editing-a-survey-people-are-answering).

## Rehearsing it: Preview [#rehearsing-it-preview]

Switch the canvas from **Editor** to **Preview** (or press <kbd>P</kbd>) to walk the
form exactly as a respondent will, including edits you have not saved: the same pages,
the same **Next** and **Back**, the same required checks, the same conditions and
follow-ups - type a number at either side of a condition's boundary to watch a question
appear and disappear. Your
answers are checked by the same rules the live form applies, so you meet the same
refusals a respondent would. **Desktop width** and **Phone width** sit in the same bar.

Nothing you enter in the preview is stored, and it never counts as a response, so you
can rehearse a survey that has already filled up. A file picked in the preview is
checked against the question's accepted files but is not uploaded. **Start over**
clears the preview's answers; Escape or <kbd>P</kbd> takes you back to the editor.

## Before you can publish [#before-you-can-publish]

The **Publish** button checks the form as you work. While something needs fixing it
shows how many, for example "2 to fix", and the list names each problem; select one to
go to it. Typical ones:

* a question with no text, or an answer option with no label;
* a choice question with no options, or a table question with no columns;
* a scale outside 0 or 1 to 3-10, or a number range whose smallest value is above its
  largest;
* a condition that names a question after this one, or an answer that question no
  longer offers;
* a condition with no number to compare with, or a range with an end missing or its
  lowest value above its highest;
* a follow-up question with no text, or one asked for an option the question no longer
  offers;
* more questions, pages or options than the limits allow.

When the list is empty, publishing is one click - see
[Publishing and versions](./publish-and-versions.mdx).
