Create Sidebar menu automatically using button

Hi Everyone,

Just want to know if there is a way or is it feasible that via a button that has been clicked it will automatically create a sidebar menu option with multiple level?

Sample is as per attached image when I click “Add Entity” Button it will give me a form to generate to input all information and create the multi-level sidebar menu.

Screenshot 2025-01-06 141123

Hoping for your suggestions and insights.

Thank you.