How to display the form header in a GlideModalForm dialog window


Description

This article describes how you can display the form header in a GlideModalForm dialog window. This can be achieved by using the setPreference function with the sysparm_titleless preference. The values are either true (no header) or false (header). 

The images below show the difference of each.

No Header

GlideModalForm with no header

With Header

GlideModalForm with header

Release or Environment

All

Instructions

1) Define a reference to a new GlideModalForm 

2) Call the setPreference method as follows: setPreference("sysparm_titleless", "false");

Sample Code:


var myModalForm = new GlideModalForm("Create Incident", "incident");
myModalForm.setPreference("sysparm_titleless", "false");

Additional Information

https://developer.servicenow.com/dev.do#!/reference/api/orlando/client/c_GlideModalFormV3API