How to collapse the Sidebar on clicking Submit button?

How to collapse the Sidebar on clicking Submit button ?