Dynamic and personalized content with variables

Variables are a great way to make a quiz, poll, or survey more dynamic and personal. With variables, you can ask a user for their first name on the first block of a riddle and then use that name to address the user personally in the following blocks.

User variables to add dynamic content collected from form and other quiz blocks.

Variables and the Riddle Data Layer

Variables also work great with the Riddle Data Layer, allowing you to pass data to a Riddle and then use that data within the Riddle. If you have placed your quiz behind a user login and you already know the quiz taker’s first name from the login details, you can pass that name to Riddle and use it throughout the quiz – even to pre-fill a form if you like.

Repeat previous quiz answers

Variables can also use a user’s answer to a question and display that on a following block.

If you ask a user if they prefer Pizza or Pasta, you can use that answer in the next block and write something like “As you stated you prefer Pizza, what is your favorite Pizza place in the city? Type your answer below”.

If the previous answer was Pasta instead of Pizza, the variable would display that. Riddle automatically changes your next question to: “As you stated, you prefer Pasta; what is your favorite Pasta place in the city? Type your answer below”.

A no-code solution for dynamic content

The beauty about the Riddle variables is that there is nothing you need to code or develop to use them. Almost any item in a riddle automatically becomes available as a variable.

Any form field and answer in a question block can be used as a variable.

To add a variable to a text, click the (+) icon on the bottom right corner of the text editor and select the variable type.

Using Default Values as fall-back

Sometimes a variable is not filled with any data; in that case, we offer default values as an alternative. If you have a form field asking for the user’s first name but allow the user to skip this form and stay anonymous, the variable will be empty.

Adding a meaningful default value allows you to use the variable and avoid holes in your text. In this example, a great default would be the word “there.” Now greet the user with: “Hi ‘there’ thanks for taking the quiz,” in case the name entry form was skipped.


One important thing to keep in mind when using variables in your Riddles is to test them thoroughly. Make sure that the variables are passing the correct data from one block to another, and that the default values are meaningful and don’t create confusion for the user. Additionally, it’s a good idea to use variables sparingly and only when they add value to the user experience. Too many variables can make your Riddle feel cluttered and confusing, so make sure to use them judiciously.

Finally, it’s worth noting that Riddle offers a wide range of customization options that can help you take your quizzes, polls, and surveys to the next level. From custom themes and fonts to advanced logic and branching, Riddle has everything you need to create engaging and interactive content that your users will love. So if you’re looking for a powerful, easy-to-use platform for creating dynamic quizzes and surveys, give Riddle a try today!

Scroll to Top