I just posted this as a reply to another question about keeping a collection fixed on the screen.
https://answers.laserfiche.com/questions/202711/Keep-collection-visible-dont-scroll-with-the-rest-of-the-screen#202795
This Javascript also keeps the form header, including the pagination tabs fixed in position (tested on Forms version 11.0.2201.20436):
$(document).ready(function() {
//The following code fixes the form header and any sections with the stickSectionToTop class
//to the top of the form.
//For best results, on each page of your form, add a section with class stickSectionToTop, then
//add another section below that (you can select the option to hide the title if desired).
//In the second section, start with a custom HTML element which is just filled with line breaks
//and no text. You may need to experiment with how many line breaks are needed. This is because
//with the first section (that has the stickSectionToTop class) set to fixed positioning, the form
//items below it will actually stay behind it. The line breaks ensure that when scrolled to the
//top, the ensire form is visible, and no part is hidden behind the section that is stuck to the
//top.
//Remove the margin at the top of the form, to avoid seeing the form scroll above the header:
$('.cf-formwrap').css('margin-top', '0px');
//Gather all positioning details of the sections, before modifying to help position correctly:
var formBorderWidth = $('.cf-formwrap').css('border-width');
var formBorderStyle = $('.cf-formwrap').css('border-style');
var formBorderColor = $('.cf-formwrap').css('border-color');
var formWidth = $('.cf-formwrap').css('width');
var formTop = $('.cf-formwrap').css('top');
var titleWidth = $('#cf-formtitle').css('width');
var titleTop = $('#cf-formtitle').css('top');
var sectionWidth = $('.stickSectionToTop').css('width');
var sectionTop = $('.stickSectionToTop').position().top + 'px';
//Add a white background behind the sticky section to ensure form cannot be seen scrolling
//through the section:
$('#cf-formtitle').before('<div class="stickWhiteBackgroundToTop" style="position: fixed; z-index: 100; background-color: white; height: ' + sectionTop + '; width: ' + sectionWidth + '; top: ' + formTop + ';"></div>');
//Fix the form header into position on the top of the form:
$('#cf-formtitle').css('position', 'fixed').css('width', titleWidth).css('top', titleTop).css('z-index', '101');
//Fix the form border into position on the top of the form, so it doesn't scroll away:
$('#cf-formtitle').before('<div class="stickBorderToTop" style="position: fixed; z-index: 102; margin-top: -' + formBorderWidth + '; margin-left: -' + formBorderWidth + '; width: ' + formWidth + '; height: 0; top: ' + formTop + '; border-top-width: ' + formBorderWidth + '; border-top-style: ' + formBorderStyle + ' ; border-top-color: ' + formBorderColor + ';"></div>');
//Fix the section(s) with the stickSectionToTop into position on the top of the form.
$('.stickSectionToTop').each(function() {
$(this).css('position', 'fixed').css('width', sectionWidth).css('top', sectionTop).css('z-index', '103').css('background-color', 'white');
});
});