I've been scouring the internet for quite some time now, both on this platform and through Google searches, but I can't seem to find what I'm looking for. (Apologies if I missed it and this comes across as a repetitive or annoying question.)
Currently, I am tasked with creating a form that will feature numerous drop-down menus depending on previously selected variables. I was hoping to find a more efficient way of handling this rather than manually creating and toggling individual fields based on selections made. The end goal is to have a hierarchical structure resembling a "tree" with 3-5 levels of menu items. (This is not my decision; it's coming from our clients.)
Here is how the logic unfolds:
Variables: type, offer1, offer2, insert1, insert2, insert3,...
[type] determines [offer1,2], each of which can have up to 3 variables such as [insert1,2,3...]
For instance, if the user chooses Type A: Offer1 = Array A (Insert1 = ArrayA1, Insert2 = ArrayA2, Insert3 = null) and Offer2 = Array B (Insert4 = ArrayB4, Insert5 = null), and so forth.
Thus far, all the resources I've come across seem to address only the initial tier, and JavaScript isn't exactly my strong suit. Any guidance in the right direction would be immensely helpful.