populate a on submit popup in Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2022 06:30 AM
I would like to have a on submit popup when i click on "Submit" button, so that if i click on "Yes" the form will be submitted else form will stay on the same page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2022 06:58 AM
Check below:
https://community.servicenow.com/community?id=community_article&sys_id=ceac0245db6954505129a851ca961933
https://community.servicenow.com/community?id=community_question&sys_id=35c861fcdb9673404819fb2439961906
If it helps, please mark ✅ Correct and 👍 Helpful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2022 07:03 AM
You can create a Client script with the following
UI Type = Mobile / Service Portal or All
Type = OnSubmit
Script
function onSubmit() {
//Type appropriate comment here, and begin script below
if(!confirm("Are you sure you want to submit the form?")){
return false;
}
}
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2022 07:06 AM
Hi Srinivas
You can use confirm method in your onsubmit client script.
If you want this only when user uses 'submit' button then use below logic.
var action = g_form.getActionName();
if(action == 'sysverb_insert' ) // enter correct action name here
{
if(!confirm("Are you sure you want to submit the form?")){
return false;
}
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP