Office

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_idstringrequired
titlestringrequired
descriptionstring
Under the title: what it is for, how long it takes, who sees the answers.
submit_labelstring
The send button: "Send", "Submit feedback". Default "Send".
thank_youstring
What people see after they send it.
anonymousboolean
Hide who answered from everyone, the responses sheet included.
lookobject
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.
Show child attributes
coverstring
A wide picture across the top.
logostring
A logo beside the title.
sidestring
A picture or video beside the questions on wide screens (above them on phones): a picture, a .mp4 or .webm file, or a YouTube link.
side_textstring
Words in the side panel, in Markdown: a heading, a few lines, a list, bold, links. With or without a side picture.
side_positionstring
Where the side picture sits in its panel: top (the words under it, the default), center, or bottom (the words above it). One of top, center, bottom.
backgroundstring
A picture behind the whole form.
colorstring
The main colour — buttons, chosen answers, focus — as #rrggbb.
fontstring
A Google Fonts family for all its text (find_fonts lists them).
brandboolean
Use the space's brand: its colours, fonts and logo (color, font and logo given here still win).
questionsobject[]required
Show child attributes
namestring
Its id: lowercase letters, digits and _ ("role", "team_size"); answers are stored under it, expressions refer to it as {name}. Made from the title when left out.
typestringrequired
short_text, long_text, number, email, date, single_choice, multi_choice, dropdown, image_choice (pick a picture), rating, nps (0–10), yes_no, ranking, matrix (several rows on one scale); image is not a question: a picture or video shown between them. One of short_text, long_text, number, email, date, single_choice, multi_choice, dropdown, image_choice, rating, nps, yes_no, ranking, matrix, image.
titlestringrequired
The question as people read it: "How did you hear about us?" For an image block: what it shows, for screen readers (not shown).
descriptionstring
A line under it that helps answer it.
requiredboolean
choicesstring[]
single_choice, multi_choice, dropdown, image_choice, ranking: the options, in order.
imagesstring[]
image_choice: a picture per choice, in the same order — a picture in the space (add_asset, find_images) or an https address (stored in the space for you).
multipleboolean
image_choice: people may pick more than one (max_choices to cap).
urlstring
image: the picture or video — a picture in the space or an https address (pictures are stored in the space for you), a .mp4 or .webm file, or a YouTube link.
otherboolean
single_choice, multi_choice, dropdown: add "Other" with a text box.
max_choicesinteger
multi_choice, image_choice with multiple: at most this many.
minnumber
number: the lowest allowed; rating: the scale's first value (default 1).
maxnumber
number: the highest allowed; rating: the scale's last value (default 5).
min_labelstring
rating, nps: what the low end means — "Not at all".
max_labelstring
rating, nps: what the high end means — "Extremely".
rowsstring[]
matrix: the things rated, one per row.
columnsstring[]
matrix: the scale every row is rated on — "Poor", "Fair", "Good".
placeholderstring
visible_ifstring
Show it only when an earlier answer says so, as a SurveyJS expression: "{role} = 'Engineer'", "{rating} <= 2", "{tools} contains 'Slack'".
required_ifstring
Required only when this expression is true.
pagestring
The page title; questions in a row with the same page share a page. Leave out for one page.

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_idstringrequired

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_idstringrequired
titlestring
descriptionstring
Under the title: what it is for, how long it takes, who sees the answers.
submit_labelstring
The send button: "Send", "Submit feedback". Default "Send".
thank_youstring
What people see after they send it.
anonymousboolean
Hide who answered from everyone, the responses sheet included.
lookobject
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.
Show child attributes
coverstring
A wide picture across the top.
logostring
A logo beside the title.
sidestring
A picture or video beside the questions on wide screens (above them on phones): a picture, a .mp4 or .webm file, or a YouTube link.
side_textstring
Words in the side panel, in Markdown: a heading, a few lines, a list, bold, links. With or without a side picture.
side_positionstring
Where the side picture sits in its panel: top (the words under it, the default), center, or bottom (the words above it). One of top, center, bottom.
backgroundstring
A picture behind the whole form.
colorstring
The main colour — buttons, chosen answers, focus — as #rrggbb.
fontstring
A Google Fonts family for all its text (find_fonts lists them).
brandboolean
Use the space's brand: its colours, fonts and logo (color, font and logo given here still win).
closedboolean
add_questionsobject[]
Show child attributes
namestring
Its id: lowercase letters, digits and _ ("role", "team_size"); answers are stored under it, expressions refer to it as {name}. Made from the title when left out.
typestringrequired
short_text, long_text, number, email, date, single_choice, multi_choice, dropdown, image_choice (pick a picture), rating, nps (0–10), yes_no, ranking, matrix (several rows on one scale); image is not a question: a picture or video shown between them. One of short_text, long_text, number, email, date, single_choice, multi_choice, dropdown, image_choice, rating, nps, yes_no, ranking, matrix, image.
titlestringrequired
The question as people read it: "How did you hear about us?" For an image block: what it shows, for screen readers (not shown).
descriptionstring
A line under it that helps answer it.
requiredboolean
choicesstring[]
single_choice, multi_choice, dropdown, image_choice, ranking: the options, in order.
imagesstring[]
image_choice: a picture per choice, in the same order — a picture in the space (add_asset, find_images) or an https address (stored in the space for you).
multipleboolean
image_choice: people may pick more than one (max_choices to cap).
urlstring
image: the picture or video — a picture in the space or an https address (pictures are stored in the space for you), a .mp4 or .webm file, or a YouTube link.
otherboolean
single_choice, multi_choice, dropdown: add "Other" with a text box.
max_choicesinteger
multi_choice, image_choice with multiple: at most this many.
minnumber
number: the lowest allowed; rating: the scale's first value (default 1).
maxnumber
number: the highest allowed; rating: the scale's last value (default 5).
min_labelstring
rating, nps: what the low end means — "Not at all".
max_labelstring
rating, nps: what the high end means — "Extremely".
rowsstring[]
matrix: the things rated, one per row.
columnsstring[]
matrix: the scale every row is rated on — "Poor", "Fair", "Good".
placeholderstring
visible_ifstring
Show it only when an earlier answer says so, as a SurveyJS expression: "{role} = 'Engineer'", "{rating} <= 2", "{tools} contains 'Slack'".
required_ifstring
Required only when this expression is true.
pagestring
The page title; questions in a row with the same page share a page. Leave out for one page.
change_questionsobject[]
Show child attributes
namestringrequired
The question to change, by name (names cannot change: the answers are kept under them).
typestring
One of short_text, long_text, number, email, date, single_choice, multi_choice, dropdown, image_choice, rating, nps, yes_no, ranking, matrix, image.
titlestring
descriptionstring
A line under it that helps answer it.
requiredboolean
choicesstring[]
single_choice, multi_choice, dropdown, image_choice, ranking: the options, in order.
imagesstring[]
image_choice: a picture per choice, in the same order — a picture in the space (add_asset, find_images) or an https address (stored in the space for you).
multipleboolean
image_choice: people may pick more than one (max_choices to cap).
urlstring
image: the picture or video — a picture in the space or an https address (pictures are stored in the space for you), a .mp4 or .webm file, or a YouTube link.
otherboolean
single_choice, multi_choice, dropdown: add "Other" with a text box.
max_choicesinteger
multi_choice, image_choice with multiple: at most this many.
minnumber
number: the lowest allowed; rating: the scale's first value (default 1).
maxnumber
number: the highest allowed; rating: the scale's last value (default 5).
min_labelstring
rating, nps: what the low end means — "Not at all".
max_labelstring
rating, nps: what the high end means — "Extremely".
rowsstring[]
matrix: the things rated, one per row.
columnsstring[]
matrix: the scale every row is rated on — "Poor", "Fair", "Good".
placeholderstring
visible_ifstring
Show it only when an earlier answer says so, as a SurveyJS expression: "{role} = 'Engineer'", "{rating} <= 2", "{tools} contains 'Slack'".
required_ifstring
Required only when this expression is true.
pagestring
The page title; questions in a row with the same page share a page. Leave out for one page.
remove_questionsstring[]
order_questionsstring[]

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_idstringrequired
allboolean
Also every response, newest last.
limitinteger
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_idstringrequired

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_idstringrequired
viewstring
Default form. One of form, responses.