# Forms

The 6 tools for forms. Before an agent first makes one, it reads guide topic forms.

## create_form

Make a form or survey in a space: questions people in the space answer once each (they can change their answers) — short and long text, number, email, date, single and multiple choice, dropdown, picture choice, rating, NPS, yes/no, ranking and matrix — with required questions, conditions (visible_if) and pages, pictures and videos between the questions, and a look (cover, logo, a picture or video beside the questions, background, colour, font, or the space's brand). You read the answers with read_responses and can keep them in a spreadsheet with responses_to_sheet. People comment on a question. Read guide topic "forms" first; check it with render_form.

Parameters:
- `space_id` (string, required)
- `title` (string, required)
- `description` (string): Under the title: what it is for, how long it takes, who sees the answers.
- `submit_label` (string): The send button: "Send", "Submit feedback". Default "Send".
- `thank_you` (string): What people see after they send it.
- `anonymous` (boolean): Hide who answered from everyone, the responses sheet included.
- `look` (object): How it looks. Pictures are a picture in the space (add_asset, find_images) or an https address, stored in the space for you. In update_form the parts given replace those parts; "" clears one.
- `questions` (object[], required)

## read_form

A form as it is now: its settings, its questions in order by name (what update_form and comment take), how many people answered, whether it is closed, and its responses sheet.

Parameters:
- `item_id` (string, required)

## update_form

Change a form. Any of: title and the settings (look: the parts given replace those parts, "" clears one); closed (true stops new answers, false opens it again); add_questions (after the others); change_questions (by name: the fields you give replace those fields, "" clears one); remove_questions (names; their answers stay in the responses); order_questions (every name, in the new order). Applied in that order. People who answered keep their answers; a changed question shows their old answer if it still fits.

Parameters:
- `item_id` (string, required)
- `title` (string)
- `description` (string): Under the title: what it is for, how long it takes, who sees the answers.
- `submit_label` (string): The send button: "Send", "Submit feedback". Default "Send".
- `thank_you` (string): What people see after they send it.
- `anonymous` (boolean): Hide who answered from everyone, the responses sheet included.
- `look` (object): How it looks. Pictures are a picture in the space (add_asset, find_images) or an https address, stored in the space for you. In update_form the parts given replace those parts; "" clears one.
- `closed` (boolean)
- `add_questions` (object[])
- `change_questions` (object[])
- `remove_questions` (string[])
- `order_questions` (string[])

## read_responses

What people answered: per question a summary (counts per choice, the average and spread of ratings, the NPS score, the average place in rankings, counts per matrix row, the texts written), and — with all — every response with who sent it (unless the form is anonymous) and when.

Parameters:
- `item_id` (string, required)
- `all` (boolean): Also every response, newest last.
- `limit` (integer): With all: the newest this many (default 100).

## responses_to_sheet

Keep a form's responses in a spreadsheet in the same space: one row per response, a column per question, on a tab named Responses. Made the first time; from then on every new or changed response updates it. Returns the sheet — build charts or a dashboard from it.

Parameters:
- `item_id` (string, required)

## render_form

See a form as people do: screenshots of every page of questions laid out in one column (view form), or of the responses summary (view responses), plus checks — too many questions, every question required, a long-text opener, no description — and errors the page hit.

Parameters:
- `item_id` (string, required)
- `view` (string): Default form.
