looks like you’d probably need some custom js.
for collapsing the menu we use :
this might help.
probably some widgets that do this, but this is just the html/javacript addon.
hope it helps :D
for more about this, view this topic: https://forum.mendix.com/link/questions/92540
Note: As per my original post groupboxes were not a viable solution, which is why the downvote on Dragos’ comment. The approach of using a non-persistent entity and microflow, while interesting, was a bit convoluted when it could simply be achieved with frontend js only. But thank you both for the suggestions!
Have you considered using conditional visibility to simulate the collapse? You could create a non-persistent entity with a boolean. The collapsed area can be hidden when you get to the page and then you can use a button to call a microflow that changes the boolean value to simulate the expand.
If your page structure doesn’t allow using a new entity, then you could add a boolean to your existing entity and just ensure the value is reset every time you leave the page or commit the object.
I know this not be the best solution but it will ensure that it works in IE.
Have you tried the widgets in the app store?
There’s a button for collapsing group boxes on the page, as well as a panel similar to the group box but opening above the box. I think you might find the button to do the trick although it comes with some limitations. Worst case scenario you could have a look into how they do the collapse and may be able to correct your code.
Hope this helps