Client Scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2023 10:56 PM
I have written an onsubmit client script with alret box
I dont want the dev address
How can I remove it...??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2023 05:25 AM
You can use prompt instead of alert.
Please mark my answer helpful and accept as a solution if it helped 👍✔️
Kavita Bhojane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2023 05:43 AM
that isn't possible as far as I know - instead you would need to leverage a UI page for that alert.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2023 06:02 AM
Hello @RaviSanker542 ,
as @Kristen Ankeny said this is not possible, this is an OOTB browser UI. The best you can do, if you don't want to invest the time in UI page is just to put a mandatory check box on the form for confirmation, I know that this is not the same, but with one client script, you can add an Info message or something else that suits the purpose.
All the best,
Stefan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2023 06:05 AM
You can use this script:
function onSubmit() {
if (typeof spModal != 'undefined' && !g_form._hasConfirmed) {
spModal.open({
message: 'Are yous ure to submit this request?',
title: 'Confirm',
buttons: [
{label:'✘ No', cancel: true},
{label:'✔ Yes', primary: true}
]
}).then(function(confirm){
if (confirm){
g_form._hasConfirmed = true;
if (typeof g_form.orderNow != 'undefined') {
g_form.orderNow();
} else {
g_form.submit();
}
}
});
return false;
}
}
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.