Jim Coyne
Kilo Patron

I know the question is old, but as @xiaix mentioned, you should probably use the "noDismiss" option as DOM manipulation is just not the best way to do things, especially if you have an OOTB way to do it.  And in addition, the "backdrop" and "keyboard" options are useful:

 

function onLoad() {
    spModal.open({
        noDismiss: true,    //removes the title and "x" button in the top-right corner
        backdrop: "static", //makes it a true modal, will not close the window if clicked outside the window
        keyboard: false,    //will not allow the "Esc" key to close the window
        size: "sm",         //"md" is not actually a choice, only "sm" or "lg"
        title: "Test",      //would be removed by the "noDismiss" option
        message: "Acknowledge before proceeding",
        buttons: [{
			label: "I Acknowledge",
			primary: true
		}]
    }).then(function() {
        spModal.alert("party");  //when "I Acknowledge" is clicked
    });
}

 

Unfortunately these options are NOT documented in the Docs article on spModal.