I’m trying to build some functionality that displays the correct heart worm medication for a specific breed of dog and their living environment.
First the user selects the breed (lab, bloodhound, toy poodle, etc.) from a list of breeds on the page. The user is then redirected to a detail page about that breed, listing some characteristics. On this page there will be two drop downs: one listing the type of food they are eating: hard food, wet canned, or raw diet; then a second drop down listing the dog’s living environment (indoor or outdoor).
Based on these two selections I would like to redirect the user to a Product page based on the above choices: breed, food, living environment.
I’ve already written out all the possible combinations, for example, poodle -> raw/indoor -> Product C
I guess my primary question is how do I capture what the user has selected in the two drop down boxes and render a product page based on that?
I figure my models are: Dog and Product
Thanks so much!
I should add that I just need some big picture nudging. I know this is a very broad question.