- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-30-2020 08:04 AM
I created a onload catalog client script with the following script(note: not in the widget)
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 during catalog item form load.
Need to remove close button(x) which is at right corner.
Note: this is not on widget , the script which i wrote is onload catalog client script
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2020 04:20 AM
Hi Prem,
I have written this and works:
function onLoad() {
spModal.open({
title: 'Test.',
message: "Acknowledge before proceeding",
backdrop: 'static',
size: "md",
buttons: [
{label:'I Acknowledge', primary: true},
]
}).then(function(ans){
if (ans.label == "I Acknowledge"){
//alert('party');
}
});
var checkExist = setInterval(function() {
if (top.document.getElementsByClassName('close pull-right')[0]) {
clearInterval(checkExist);
var x = top.document.getElementsByClassName('close pull-right')[0];
x.style.display = "none";
}
}, 100); // check every 100ms
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-02-2022 11:00 PM
I know the question is old, but as
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2025 11:59 PM
Hi Everyone,
Can we override the "close modal" to close