Personalize selling with product rec quizzes 👉

Get free ebook
Signup
 

Get the most out of Logic, variables, and scores (while ordering pizza!)

Branching and calculation, variables, and scores let you use the whole arsenal of the Logic tools that Typeform has to offer. You can add multiple custom variables to your form, use recall information, skip irrelevant questions and calculate scores and price. Read on to find out how.

Note: Logic isn't available on our mobile builder just yet. Edit your form on a desktop to get the full power of Logic!

In this example we’ll show you how to create a pizza order form that lets people choose the size of their pizza, add extra toppings, and optionally select a drink. Then we’ll let Branching and calculations do the math, and add up everything in a neat Payment question.

First, add your questions to your form.

1. Start with a Welcome Screen.

Screenshot 2024-10-02 at 14.29.17.png

2. Next, let’s ask people what size pizza they’d like with a Multiple Choice question.

Screenshot 2024-10-02 at 14.30.20.png

3. Then we’ll ask people what kind of dough they’d like with another Multiple Choice question.

Screenshot 2024-10-02 at 14.31.29.png

4. Now it’s time to choose topping with the help of another Multiple Choice question. You can enable Multiple selection in question settings to let people choose up to 3 toppings.

Screenshot 2024-10-02 at 14.32.16.png

5. Let’s add a Yes/No question to ask people to confirm their choices. You can type @ to use Recall information and show them what they selected.

Screenshot 2024-10-02 at 14.33.01.png

6. Add another Yes/No question to ask people whether they want extra toppings for an additional fee.

Screenshot 2024-10-02 at 14.33.45.png

7. Now people can pick their additional toppings from a Multiple Choice question with Multiple selection enabled, where they can choose as many additional toppings as they want.

Screenshot 2024-10-02 at 14.34.34.png

8. Next we’ll use a Yes/No question to ask people to confirm their selection, and show them which toppings they chose and how much it will cost them with Recall information.

Screenshot 2024-10-02 at 14.35.25.png

9. Next, we’ll ask people if they want to order a drink for an additional fee with a Yes/No question.

Screenshot 2024-10-02 at 14.36.10.png

10. If they say Yes, they can choose what they want from the drink menu with a Multiple Choice question, where they can only select one option.

Screenshot 2024-10-02 at 14.36.53.png

11. Let’s add a final Yes/No question where people can review their order with Recall information.

Screenshot 2024-10-02 at 14.37.53.png

HC_BobRoss_ilu_cropped.png
Tip! Use Question Groups to easily duplicate sets of related questions. That way, you can give respondents the option to add multiple pizzas to their order.

12. Now we can ask people for their delivery address with a Short Text question.

Screenshot 2024-10-02 at 14.38.50.png

13. Then we’ll ask for their number with a Phone Number question.

Screenshot 2024-10-02 at 14.39.56.png

14. We’ll ask for their name with another Short Text question.

Screenshot 2024-10-02 at 14.40.49.png

15. Finally we’ll create a Payment question where people can provide their credit card details and pay for their order. We’ll also show them the final price with Recall information.

Stripe_blur2.png

16. Now when people hit Submit, they’ll see an Ending screen letting them know that their order is on its way.

Screenshot 2024-10-02 at 14.45.25.png

Now that we’ve asked everything, it’s time to use the magic of Logic!

1. Go to the Logic tab, click Personalize with data then Variables.

Logic_personalize.png

2. Use + Add variable to create your own, then hit Save when you’re ready. For this form, we’ll add a custom drink, size, and toppings variable.

2024-07-03_10-34-00.png

3. Go back to the Logic tab and click Branching, segmentation and calculations to change your variable values based on how customers order their pizzas. First, let’s add values to the size variable depending on which size of pizza the customer chooses, like so.

2024-07-03_10-38-07.png

4. Then add the size variable to the final price:

2024-07-03_10-40-55.png

5. Add Logic to your Yes/No question on toppings, where people can confirm which toppings they'd like. Take people back to the previous question if they say No and to the next question if they say Yes.

2024-07-03_10-40-55.png

6. Then add Logic to the Yes/No question on additional toppings to take people to the additional topping selection, or let them skip it if they don’t want additional toppings.

2024-07-03_11-17-15.png

7. Repeat the process for size with the toppings variable—for every topping chosen, add 1 to the variable. The difference here is that each topping costs the same, but people can choose multiple toppings which will then be added to the final price.

2024-07-03_10-55-36.png

Then, add the toppings variable to price.

2024-07-03_10-58-10.png

8. Add Logic to the Yes/No question confirming the additional toppings. Customers who answer No will go back to the previous question and can change their topping choices, while customers who answer Yes will move on to the drink ordering question.

2024-07-03_11-15-02.png

9. Add Logic to the Yes/No question asking about adding a drink - customers who say they want a drink will see the drink selection question, and customers who don't want to add a drink can review their final order.

2024-07-03_11-21-09.png

10. On the drink selection question, use Logic to add 1 to the drink variable for any drink chosen.

2024-07-03_11-23-43.png

Then, add the drink variable to the price variable.

2024-07-03_11-39-09.png

11. Add your final Logic to the Yes/No question where customers can confirm their order. This way when people see a mistake in their order details, they’ll be taken back to the first question, and if they confirm their order, they’ll be asked to add their contact details.

2024-07-03_11-40-37.png

That’s it, your order form is ready! You better start heating up the oven and chopping your ingredients to bake all that delicious pizza.

If you feel like one pizza is not enough, you can check out our article about how to multiply by quantity selected here.

Tap into our community knowledge