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

Shopping Cart logic in Qualtrics

  • June 29, 2023
  • 1 reply
  • 175 views

Forum|alt.badge.img+1

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?

1 reply

ArunDubey
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+41
  • QPN Level 8 ●●●●●●●●
  • 589 replies
  • June 29, 2023

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.