I'm working on my company website, and trying to help users figure out the product they would need -- I figure this is basically like making an interactive flowchart, where conditional logic determines what the next question will be.

What is this feature called, and what's the best way to display the final results?

I'm specifically thinking about where each question is on separate "pages", where the next set of info is animated. Something almost like those online "which animal are you" quizzes, or like this (except this one has the same options, not conditional) https://www.samsara.com/pricing-2

So something like this:

1: What are you repairing?

  • Boat
  • Car

2a: (if boat) What type of boat?

  • Sailboat
  • Yacht

2b: (if car) What type of car?

  • Compact
  • Truck

3: Final results

(if sailboat) Get sails (link to learn more)

(if yacht) Get rudder (link to learn more)

(if compact) Get tires (link to learn more)

(if truck) Get muffler (link to learn more)

1 Answer 1


This concept isn't complicated for programming - what is interesting you can provide x numbers of branches of different depths. and condition not only on the principle of truth - false, but also on more complex conditions (values, numbers etc.)

It's possibility to visualise that type of logic in tree:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.