Create Poll

When building a poll you can add:

  • SingleChoice and MultipleChoice questions
  • Other question formats: Likert/Matrix, Order, Upvote, and NetPromoterScore
  • Form fields
  • General blocks
  • One result page

Add Single/multiple choice questions

Properties

PropertyRequiredTypeDescriptionDefault
titlestringThe question
typestringset to SingleChoice or MultipleChoice
itemsstring[]An array of possible choices
itemsShuffledbooleanIf set to true, the order of the items/choices will be shuffledfalse
requiredbooleanIf set to false, the user can skip the questiontrue

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

PropertyRequiredTypeDescriptionDefault
titlestringThe question
descriptionstringThe description of the question
typestringset to Matrix
itemsstring[]An array of possible choices
itemsShuffledbooleanIf set to true, the order of the items/choices will be shuffledfalse
scalestring[]|arrayThe scale the user can choose from, e.g. 'Bad', 'Medium', 'Good'5 scale items from 'Strongly agree' to 'Strongly disagree'
isNaEnabledbooleanIf set to true, the user can select 'Not applicable' for each itemfalse
isSingleChoiceEnabledbooleanIf set to true, the user can select only one answer for each itemtrue

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

PropertyRequiredTypeDescriptionDefault
titlestringThe question
descriptionstringThe description of the question
typestringset to Order
itemsstring[]An array of possible choices
itemsShuffledbooleanIf set to true, the order of the items/choices will be shuffledfalse
layoutTypestringThe layout of the items, either Rows or ColumnsRows
rankFormatstringHow the ranks of the items are displayed, either Number, Letter or NumberEnumNumber

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

PropertyRequiredTypeDescriptionDefault
titlestringThe question
descriptionstringThe description of the question
typestringset to Upvote
itemsstring[]An array of possible choices
itemsShuffledbooleanIf set to true, the order of the items/choices will be shuffledfalse
maxVotesintegerThe 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

PropertyRequiredTypeDescriptionDefault
titlestringThe question
descriptionstringThe description of the question
typestringset to NetPromoterScore
positiveTitlestringThe title of the positive score, e.g. I completely agree
negativeTitlestringThe 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"
    }
}