Create Poll
When building a poll you can add:
SingleChoice
andMultipleChoice
questions- Other question formats:
Likert
/Matrix
,Order
,Upvote
, andNetPromoterScore
- Form fields
- General blocks
- One result page
Add Single/multiple choice questions
Properties
Property | Required | Type | Description | Default |
---|---|---|---|---|
title | ✓ | string | The question | |
type | ✓ | string | set to SingleChoice or MultipleChoice | |
items | ✓ | string[] | An array of possible choices | |
itemsShuffled | boolean | If set to true , the order of the items/choices will be shuffled | false | |
required | boolean | If set to false , the user can skip the question | true |
Example object
{
"title": "The best noodles?",
"type": "SingleChoice",
"items": [
"Spaghetti",
"Fusilli"
]
}
Here the difference between SingleChoice
and MultipleChoice
is that with SingleChoice
the user can only select one answer, while with MultipleChoice
the user can select multiple answers. Apart from that, they are the same for the build configuration.
Add Likert / matrix question
A matrix question allows you to ask a question with multiple items and a scale. The user can select one answer for each item.
Properties
Property | Required | Type | Description | Default |
---|---|---|---|---|
title | ✓ | string | The question | |
description | string | The description of the question | ||
type | ✓ | string | set to Matrix | |
items | ✓ | string[] | An array of possible choices | |
itemsShuffled | boolean | If set to true , the order of the items/choices will be shuffled | false | |
scale | string[]|array | The scale the user can choose from, e.g. 'Bad', 'Medium', 'Good' | 5 scale items from 'Strongly agree' to 'Strongly disagree' | |
isNaEnabled | boolean | If set to true , the user can select 'Not applicable' for each item | false | |
isSingleChoiceEnabled | boolean | If set to true , the user can select only one answer for each item | true |
Example object
Here is an example with only the required configuration properties:
{
"title": "I am happy with the following aspects of Riddle.",
"description": "Choose one from 'Strongly agree' to 'Strongly disagree'",
"type": "Matrix",
"items": [
"Design",
"Usability",
"Performance"
]
}
For the next example we additionally shuffle the items, customize the scale (and its values) and set the other flags.
{
"title": "I am happy with the following aspects of Riddle.",
"description": "Choose one from 'Bad' to 'Good'",
"type": "Matrix",
"items": [
"Design",
"Usability",
"Performance"
],
"itemsShuffled": true,
"scale": {
"0": "Bad",
"2": "Medium",
"4": "Good"
},
"isNaEnabled": true,
"isSingleChoiceEnabled": false
}
As you can see in the above example the scale
property can be an array of strings, where the index of the string is the value that will be saved in the database (e.g. user has selected Bad
=> scale value 0 will be saved as the response.). By default the scale values are a series of auto incremented integers. Simply omit the keys/indices to use the default scale values, e.g. {"scale": ["Bad", "Medium", "Good"]}
.
Add order it question
An order it question allows you to ask a question with multiple items and the user can drag and drop them into the order they prefer.
Properties
Property | Required | Type | Description | Default |
---|---|---|---|---|
title | ✓ | string | The question | |
description | string | The description of the question | ||
type | ✓ | string | set to Order | |
items | ✓ | string[] | An array of possible choices | |
itemsShuffled | boolean | If set to true , the order of the items/choices will be shuffled | false | |
layoutType | string | The layout of the items, either Rows or Columns | Rows | |
rankFormat | string | How the ranks of the items are displayed, either Number , Letter or NumberEnum | Number |
Example object
{
"title": "What are your favorite animals?",
"description": "Drag and drop the items into the order you prefer",
"type": "Order",
"items": [
"Dog",
"Cat",
"Bird",
"Fish"
],
"layoutType": "Rows",
"rankFormat": "Number"
}
Add upvote question
An upvote question allows you to ask a question with multiple items and the user can select one or more items to upvote.
Properties
Property | Required | Type | Description | Default |
---|---|---|---|---|
title | ✓ | string | The question | |
description | string | The description of the question | ||
type | ✓ | string | set to Upvote | |
items | ✓ | string[] | An array of possible choices | |
itemsShuffled | boolean | If set to true , the order of the items/choices will be shuffled | false | |
maxVotes | integer | The maximum number of items the user can upvote |
Example object
{
"title": "What do you like most about Riddle?",
"description": "Select one or more items",
"type": "Upvote",
"items": [
"Design",
"Usability",
"Performance"
],
"itemsShuffled": true,
"maxVotes": 2
}
Add Net Promoter Score question
Properties
Property | Required | Type | Description | Default |
---|---|---|---|---|
title | ✓ | string | The question | |
description | string | The description of the question | ||
type | ✓ | string | set to NetPromoterScore | |
positiveTitle | ✓ | string | The title of the positive score, e.g. I completely agree | |
negativeTitle | ✓ | string | The title of the negative score, e.g. I completely disagree |
Example object
{
"title": "How likely are you to recommend Riddle to a friend?",
"description": "Select one of the options below",
"type": "NetPromoterScore",
"positiveTitle": "I completely agree",
"negativeTitle": "I completely disagree"
}
Result page
In a poll only one result page is allowed which is specified in build.result
. Basic results have a title
and description
property.
Example in build.result
:
{
"title": "Thank you!",
"description": "We are happy to have you here"
}
If you want to create complex result pages with texts, images, answered blocks, ... click here to learn how to build advanced result pages.
Full example
{
"title": "Poll example (Builder API)",
"type": "Poll",
"blocks": [
{
"title": "What's your favorite color?",
"type": "SingleChoice",
"items": [
"Red",
"Blue",
"Green",
"Yellow"
]
},
{
"title": "What are your favorite animals?",
"type": "MultipleChoice",
"items": [
"Dog",
"Cat",
"Bird",
"Fish"
]
},
{
"title": "I am happy with the following aspects of Riddle.",
"description": "Choose one from 'Bad' to 'Good'",
"type": "Matrix",
"items": [
"Design",
"Usability",
"Performance"
]
},
{
"title": "What are your favorite animals?",
"description": "Drag and drop the items into the order you prefer",
"type": "Order",
"items": [
"Dog",
"Cat",
"Bird",
"Fish"
]
},
{
"title": "What do you like most about Riddle?",
"description": "Select one or more items",
"type": "Upvote",
"items": [
"Design",
"Usability",
"Performance"
]
},
{
"title": "How likely are you to recommend Riddle to a friend?",
"description": "Select one of the options below",
"type": "NetPromoterScore",
"positiveTitle": "I completely agree",
"negativeTitle": "I completely disagree"
}
],
"result": {
"title": "Thank you!",
"description": "We are happy to have you here"
}
}