Custom script to collapse or hide sidebar on form view

Hello,

Which is the best way to collapse sidebar by default using a custom script in certain DocType?

Thanks.

onload: function(frm) {
        $('span.sidebar-toggle-btn').hide();
        $('.col-lg-2.layout-side-section').hide();
}
1 Like