I know how to do with with plain PHP ....
Unfortunately, there is NO WAY to do it in pure PHP. But heads up, there's still a way.
Note: This will provide a horrible user experience as the page will reload after changing the dropdown. But if that's okay, then there's no problem.
It kind of sounds like you might be able to get away with a nested / hierarchical select menu, depends on what kind of data is being displayed in the corresponding div. You can use "optgroup" for this, or if it's more complex there's always select 2.
If the data is not something applicable for a hierarchy inside a select, like already mentioned you'll need to use the on change event or something along those lines. You could have the subsequent sections all loaded by default and just dynamically hide / display the related section when the select changes.
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us