Personalize each respondent’s experience with logic, variables, and calculations

Logic helps you tailor the experience for each respondent. In this guide, we'll create a registration form that uses branching, hides questions, and hides answer choices to show only what’s relevant to each respondent and create event-specific paths. We'll also use variables and calculations to work out a registration total and collect payment, all in one form.

Before you start

  • Build your form in the desktop builder. Logic isn’t available in the mobile builder.
  • Add a Payment question if you want to use the built-in price variable to calculate and then collect payment. The price variable becomes available after you add a Payment question connected to Stripe or PayPal.

Start with Typeform AI

You can ask Typeform AI to create a first draft of your event registration form. For example, ask it to create a short form with name, email, ticket types, event choices, lunch options, and add-ons. Review the suggested questions and branching before applying them, then add the price calculations manually.

Want help creating the perfect prompt? Check out our Typeform AI prompt library.

Create your form manually

If you prefer to create your form manually, start by adding these questions and Question Groups in the Content panel:

  1. Add a Welcome Screen to introduce the registration form.

  1. Add a Short Text question asking What’s your name?

  1. Add an Email question asking What’s your email address?

  1. Add a Multiple Choice question asking Which ticket would you like? Include options such as:
  • Standard ticket ($49)
  • VIP ticket ($99)

  1. Add a Multiple Choice question called Which event would you like to attend? Include options such as:
  • Form-building workshop
  • AI for teams webinar

  1. Add a Question Group for each event. Add questions that are relevant to that event, such as:
  • In the workshop group, ask which topic the attendee would like to explore and what they want to learn.
  • In the webinar group, ask about the attendee’s experience level and what they’d like the webinar to cover.

  1. Add a Yes/No question asking Would you like to add lunch?

  1. Add a Multiple Choice question called Which lunch option would you like? Include options such as:
  • Vegetarian lunch ($15)
  • Standard lunch ($15)

  1. Add a Multiple Choice question asking Would you like to add anything else to your registration? Turn on Multiple selection and include options such as:
  • T-shirt ($20)
  • Parking pass ($10)

  1. Add a Statement question to show a registration summary. Type @ to add Recall information, then select the answers or the current value of the price variable.

  1. Add a Payment question so people can review the total and pay for their registration.

  1. Add an End screen to confirm that the registration was submitted.

Add logic

Use logic to create different paths through your form, hide questions that aren’t relevant, or show only the answer choices that apply.

Add branching

Use branching when an answer should change where someone goes next. In this example, people choose an event and then see a different set of questions for that event.

Learn more in What is branching logic?.

  1. Select the Which event would you like to attend? question.

  1. Click the plus sign (+) next to Logic in the right-side panel.

  1. Select Branching.

  1. Add a rule to send people who choose Form-building workshop to the workshop Question Group.

  1. Add a rule to send people who choose AI for teams webinar to the webinar Question Group.

  1. On the last question in each Question Group, add a rule to send respondents to the Would you like to add lunch? question. This makes sure they skip the other event’s questions.

  1. Click Save.

HC_BobRoss_ilu_cropped.png
Tip! You can also add branching from the Workflow panel. Click Workflow, then either select the question in the Logic Map or select Logic, choose the question, and add or edit a Branching rule.

Hide questions

Hide questions when you want to skip an individual question that isn’t relevant, while keeping the rest of the form in the same order. For example, you could add a Do you have any dietary requirements? question after the lunch question and hide it when someone doesn’t want lunch.

  1. Select the Do you have any dietary requirements? question, then click the plus sign (+) next to Logic in the right-side panel.

  1. Click Question display.

  1. Click + Add hide question rule.

  1. Create a rule to hide the dietary requirements question when Would you like to add lunch? is No.

  1. Click Save.

Learn more in Use logic to hide questions.

Hide answer choices

Hide answer choices when you want to keep a question visible but remove options that don’t apply. For example, you could ask attendees which sessions interest them, then let them rank only the sessions they selected.

  1. Add a Multiple Choice question asking Which sessions interest you? Turn on Multiple selection and add the available sessions.

  1. Add a Ranking question asking respondents to Rank your choices in order of preference

 

  1. From the Ranking question, click the + next to Logic.

  1. Click Hide answer choices.

  1. Click + Add hide answer rule.

  1. Create rules to hide each session from the Ranking question when it wasn’t selected in the Which sessions interest you? question.

  1. Click Save.

Learn more in Use logic to hide answer choices.

Add calculations

The price variable keeps a running total of the amounts you add to the form. For more examples, see Add a price or score calculation to your form.

  1. Click Workflow, then select Logic.

  1. Select the Which ticket would you like? question.

  1. Select Calculations, then click + Add calculation.

  1. Add a calculation for each ticket option. For each rule, select + Add, choose Enter a number, enter the amount, and select the price variable. For example:
  • Add 49 to the price variable when the answer is Standard ticket ($49).
  • Add 99 to the price variable when the answer is VIP ticket ($99).

  1. Select the Which lunch option would you like? question and add a calculation for each lunch option:
  • Add 15 to price when the answer is Vegetarian lunch ($15).
  • Add 15 to price when the answer is Standard lunch ($15).

  1. Select the Would you like to add anything else to your registration? question and add a calculation for each add-on:
  • Add 20 to price when the answer includes T-shirt ($20).
  • Add 10 to price when the answer includes Parking pass ($10).

  1. Click Save when you’re finished.

When someone selects more than one add-on, the amount for each selected option is added to the total.

Use custom variables for separate totals

You can create custom Number variables to track separate amounts, such as the ticket subtotal and add-on subtotal. See How to add and change variables for more information.

For example, you can use a custom variable called ticket_total to track the ticket subtotal separately from the overall price total:

  1. Click Workflow, then select the Variables icon.

  1. Click + Add custom variable.

  1. Choose Number, enter ticket_total as the variable name, and set its base value to 0. Click Save.

  1. Return to Workflow → Logic, select the Which ticket would you like? question, and select Calculations.

  1. Add 49 to ticket_total when the answer is Standard ticket ($49). Add 99 to  ticket_total when the answer is VIP ticket ($99).

  1. Click Save.

You can use Recall information to show the ticket_total value in a later question or End sreen. Variable names can contain lowercase letters, numbers, and underscores.

Review and test your form

Open Workflow and review the Logic Map to review the paths through your form.

Then open your form in Preview by clicking the Play icon and test every path.

Optional next steps

Track registration sources with URL parameters

If you share your form through different campaigns, partner links, or event pages, use URL parameters to pass information such as the campaign source or event name into your form. Open Workflow, select Pull data in, and add the parameters you want to use.

Manage registrants with Contacts and Automations

If your form collects an email address, you can map form responses to Contact properties, create a list of registrants, and use Automations to send confirmation or reminder emails.

That’s it! You’ve created an event registration form with relevant questions, a running total, and payment.

Let people buy more than one ticket

If people can register for a group, ask how many tickets they need and multiply the ticket price by that number.

  1. Add a Number question asking How many tickets would you like? directly after the Which ticket would you like? question.
  2. Select the Number question and click the plus sign (+) next to Logic.
  3. Select Calculations, then click + Add calculation.
  4. Create a rule to multiply the price variable by the answer to How many tickets would you like?
  5. Click Save.

For example, if someone chooses a VIP ticket ($99) and enters 3, the price variable becomes 297.

Learn more in Create an order form and shopping basket with branching and calculations.

Was this article helpful?

Have more questions? Submit a request

Tap into our community knowledge

Find answers

Can’t find what you’re looking for?

Contact support