- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2017 08:09 AM
Hi All,
I'm trying to add a confirm box on a record producer for our service portal. I've got the below code, when I go through the 'try it' button the confirm box appears, but regardless of if I select 'ok' or cancel it still submits the record. I need it to only submit if 'ok' is selected and to return to the form if 'cancel' is selected.
My other issue is when I tried to run this by logging into the portal when I clicked submit on my form the confirm box never appeared?
Any help is greatly appreciated.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2017 08:12 AM
I haven't done anything in the service portal, but I believe you need to return the confirm response
so
function onSubmit() {
return confirm("Please confirm");
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2017 11:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2017 01:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2017 08:20 AM
Sam, you have to process your popup box answer as follows
var answer= confirm( ".....");
if (answer== true)
{
//your script to ok should come here
}
else
{
return false; //stops the submission of form
}