
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2022 10:06 AM
Hi SNow experts,
Is there a way to add a pop-up message or a modal window when i clic the submit button?
Note: It's a widget.
Thanks in forwards,
Leo
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2022 01:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2022 10:14 AM
Hi @Leonarda Chavez
Yes, we can do.. I am sharing some code..modify according to your requirement.
HTML
<div>
<button type="button" ng-click = "c.submit()" class="btn btn-success pull-right" >Submit</button>
</div>
Client
c.submit= function(){
spModal.open({
title: 'Are you sure you want to submit?',
message: 'Type YES',
input: true,
}).then(function(name) {
c.data.updateComment= name;
c.server.update();
})

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2022 10:30 AM
Hi
Thanks but im still getting no message, probably i estructure it wrong.
HTML Template
<input class=input type="submit" value="Submit" ng-click="c.changed()">
Client Script
c.changed = function() {
spModal.open({
title: 'Test',
message: 'This is a test'
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2022 11:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2022 11:30 AM
api.controller = function(spUtil, $scope, spModal) {\
var c = this;
c.changed = function() {
c.confirmed = "asking";
spModal.confirm("Are you sure to submit this?").then(function(confirmed) {
c.confirmed = confirmed; // true or false
});
};
I hope it definitely helps you, if so please mark my response as both correct and helpful.