Page 1 of 1

Hide SP ribbon in modal view

Posted: 06 Apr 2016
by mcgaafar
Hi,
I used the general settings of Forms Designer to hide SP ribbon on my forms and it's working fine unless the form is opened in modal view, in that case the ribbon is shown again. So how do i hide it in that case?
Thanks.

Re: Hide SP ribbon in modal view

Posted: 07 Apr 2016
by rostislav
Hi,

Use this:

Code: Select all

if (window.top !== window.self) {
	$('#s4-workspace').css('height', $('#s4-workspace').css('height') + $('#s4-ribbonrow').css('height'));
	$('#s4-ribbonrow').css('display', 'none');
}

Re: Hide SP ribbon in modal view

Posted: 07 Apr 2016
by mcgaafar
That worked perfectly, thanks.