We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How to change the size of the modal.

JDX7913
Tera Guru

How do I expand the size of the modal past the "lg" preset? 

This is what I have so far on the client script: 

	c.modalTemplateResolveActiveContract = function () {
		c.modalInstance = $uibModal.open({
			templateUrl: 'modalTemplate',
			scope: $scope,
			size: 'lg',
			backdrop: 'static'
		});
	};
	c.closeModal = function () {
		c.modalInstance.close();
	};

I tired "xlg" but that does not work. Is there another way to achieve what I am aiming for?

6 REPLIES 6

I can not seem to figure out how to get the height of modal-content to be 100%. Any help?

margiej1
Tera Contributor

I am a bit late to the party, but I found an answer in the OOB UI Action "De-escalate Case" when searching for a solution to a clipped modal.

 

There is a height parameter. See below for its use.

 

		g_modal.showFrame({title: 'De-escalate Case',
						   url: '/sn_customerservice_escalation.do?sys_id='+answer+'&sysparm_view=request_de_escalation&sysparm_titleless=true&sysparm_isWorkspace=true',
						  size:'lg',
						  height: '25rem'});