Shopping Cart logic in Qualtrics | XM Community
Skip to main content

Hi all,

I need to make a sort of shopping cart form in Qualtrics where a user can select a certain number of different items while still staying below a budget.

For example, say baseballs cost $5 each and basketballs cost $8 each.  Given a budget of $20, a user could select any combination of the following:

  • 4 baseballs (or fewer) and 0 basketballs
  • 2 baseballs (or fewer) and 1 basketball
  • 0 baseballs and 2 basketballs (or fewer)

The form would prevent the user from selecting 3 baseballs and 1 basketball, as that would total $23, over the $20 limit.  Does anyone know of a way to implement this without creating one question with each possible combination as options?

You have two options. Either you can use custom validation for dropdown selection, or you can use JS to check the selection and can hide the option or disable the selection if amount is getting high.


Leave a Reply