Create Poll

When building a poll you can add:

  • SingleChoice and MultipleChoice questions
  • Other question formats: Likert/Matrix, Order, Upvote, NetPromoterScore, RateIt, and Swiper
  • 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"
}

Add Rate It question

Properties

PropertyRequiredTypeDescriptionDefault
titlestringThe question
descriptionstringThe description of the question
typestringset to RateIt
itemsstring[]An array of possible choices
itemsShuffledbooleanIf set to true, the order of the items/choices will be shuffledfalse
displayTypestringThe display type of the items, either Stars or NumbersStars
starCountintegerThe number of stars to display (if displayType is set to Stars)5
numberMinintegerThe minimum number to display (if displayType is set to Numbers)1
numberMaxintegerThe maximum number to display (if displayType is set to Numbers)10

Example object

{
    "title": "How would you rate Riddle?",
    "type": "RateIt",
    "items": [
        "Design",
        "Usability",
        "Performance"
    ],
    "itemsShuffled": true
}

Add Swiper question

Properties

PropertyRequiredTypeDescriptionDefault
titlestringThe question
descriptionstringThe description of the question
typestringset to Swiper
itemsstring[]An array with exactly two PollSwiperItemBlock items (FIRST: Negative, SECOND: Positive); described in detail below
colorLikeButtonBackgroundstringThe background color of the like button#59e1abff
colorLikeButtonIconstringThe color of the like button icon#000000ff
colorLikeButtonTextstringThe color of the like button text#000000ff
colorDislikeButtonBackgroundstringThe background color of the dislike button#000000ff
colorDislikeButtonIconstringThe color of the dislike button icon
colorDislikeButtonTextstringThe color of the dislike button text#ffffff

Specify negative / positive items

If you want to specify the negative / positive items in more detail, pass two PollSwiperItemBlock objects in the items array. Each of these blocks has the following properties:

PropertyRequiredTypeDescriptionDefault
titlestringThe title of the item
emojistringThe emoji to display in the item, e.g. 👍 or 👎
mediastringThe URL of the image or video to display in the item

Note: Only one of title, emoji, and media can be set. If you set title, the emoji and media will not be displayed. If you set emoji, the title and media will not be displayed. If you set media, the title and emoji will not be displayed.

Example object

{
    "title": "How do you feel about Riddle?",
    "description": "Swipe left or right to answer",
    "type": "Swiper",
    "items": [
        {
            "emoji": "😞"
        },
        {
            "emoji": "😍"
        }
    ]
}

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"
    }
}