Need to remove Close(X) button from spmodal and user need to acknowledge the popup

Prem13
Tera Contributor

I created a onload catalog client script with the following script

function onLoad() {
  spModal.open({
			title: 'Test.',
			message: "ACknowledge before proceeding",
		
			size: "md",
			buttons: [
				{label:'I Acknowledge', primary: true},
				//{label:'Cancel', primary: false}
			]
		}).then(function(ans){
			if (ans.label == "I Acknowledge"){
				//alert('party');
				
			} 
		});
	
   
}

This is how the popup comes up onform load.

find_real_file.png

I need to remove close button(x) which is at right corner and if i click on escape key the popup gets closed need to restrict that. Because before proceeding with catalog item user needs to acknowledge and order the catalog item

10 REPLIES 10

Willem
Giga Sage
Giga Sage

Hi @Prem I see you posted a duplicate after this one:

https://community.servicenow.com/community?id=community_question&sys_id=98489106db561cd0190b1ea66896...

 

Can you mark my answer as correct in both so they are both closed off and for other people to find?

 

Kind regards,

Willem