How do I use product quantities in conditional logic?

You can use the number of selected products as a condition in your form's logic.

This comes in handy for lots of use cases like:

  • Selling tickets and conditionally capturing information on the number of selected tickets.
  • Adding product modifiers to products (e.g. the size and color of T-shirts).

When adding a logic condition, clicking a Product question will expand into a list of total and individual product quantities. This allows you to specify the quantity of products in your conditions.

Clicking a Product question will expand into a list of total and individual product quantities.

How do I set this up?

Before you start, configure your Product question:

  1. Add your desired products.
  2. Toggle on "Can buy more than one product."

Once the Product question is set up, you can go ahead and add a condition anywhere Logic can be used on the form.

To specify a product's quantity as a condition:

Choosing a Product question displays a list of product quantities inside that Product Field.
  1. Select the Product question from the dropdown list. More options will automatically appear in the same dropdown menu.
  2. Select your desired product from the list of additional options.
  3. Select your logic operator ("is", "is more/less than", etc...).
  4. Enter the number you wish to compare the product's quantity to.
  5. Hit "Done."

Guided Tutorial: Adding size and color questions for a product

For a more in-depth guide, let's say we're using a field on our form to sell some brand merchandise.

Screenshot of a products-type question on a live form called "Potterform Store". There are four product choices: T-Shirt, Sweatshirt, Tote Bag, and Set of Pottery Tools.

When the submitter chooses "T-Shirt," we want to offer a few different customization options for each of the tees that they order.

  1. The first step is that we need to restrict the number of T-shirts the customer can order. We'll be creating a set of questions to be used for each of the selected tees, so we can't let the customer choose 1,000 (unless you want to create 1,000 groups of questions). For this example, we have set the maximum number of T-shirts per submission to 5 (pictured below).

    Screenshot of the "Products" tab of a Products field's configuration page. The setting "Maximum Quantity / Submission" is highlighted, with the number 5 entered.
  2. Add a break to the form, and toggle on Section visibility logic.

    Toggle on section visibility logic.
  3. Configure it to be visible when T-shirt quantity is more than "0".

    Conditional Logic is set to "T-shirt quantity" "is more than" "0"

    is more than "0" simply means that the content in this section will only be used when there is at least one T-shirt selected.

  4. Beneath the section break, add the questions that you would like to ask when the customer has selected at least one T-Shirt.

    Screenshot of a section break in the form editor, with a heading "Tee #1" and three questions underneath.
  5. When you're happy with the set of questions, duplicate the group of questions multiple times until there is a separate group of questions for each potential item. In our example, we'll want five groups for the maximum five tees per order.

    Screenshot of the "Duplicate Group" icon. This is found by first hovering the mouse over a group of questions; a few icons will then appear right above the group on the far right side.
  6. Above the next group of questions, insert another section break. We'll configure logic on this one just like the break we created in Step 2, except we want the rule to be when "T-Shirts Quantity is more than 1".

  7. Repeat Step 6 for all of the remaining question groups; setting each condition so that T-shirt quantity is more than 2 for tee #3,is more than 3 for tee #4, and so on...

  8. (Optional) Add one final section break after the last group of questions. Make sure toggle visibiliy logic is toggled off.

  9. You're done! Make sure to test your form to make sure it works as expected.

Gotchas

  • Depending on your needs, the breaks can either be full page breaks, or inline sections that display on the same page.
  • It's helpful, at least while setting up, to write some text above each question group so you can quickly identify what number you're up to.
  • If you don't care which product is selected, you can use the same kind of logic, but on the "Total Quantity" which sums up all of the selected products in the product question.
  • If you are using section breaks (showing the content on the same page, not on a new page), make sure you add a section break after all of the product-related questions. that is always visible if you have different questions or content that you would like to be visible on the same page.