Mathematica conditional input field

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 4K views
iva_bg
Messages
8
Reaction score
0
Hello,

I need help constructing a drop-down menu in Mathematica with options depending on the selection from a previous drop-down menu. The example is first the user selects a continent, and then the second drop-down menu shows the respective countries.

Any help would be much appreciated.
 
Physics news on Phys.org
Is this the type of thing?

Row[{PopupMenu[Dynamic[pop1], {"123", "abc"}],
Dynamic[PopupMenu[Dynamic[pop2], If[pop1 === "123", {1, 2, 3}, {a, b, c}]]]
}]
 
Yes, that is great, thank you :)