How to add Alert message to a OOB Document pdf task Widget without cloning the widget?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 11:36 AM
Hi. I need to add a confirmation message on click of the submit button on a PDF document to-do task (which is configured through Widget). How can I achieve it using client scripts without touching the widget? Please advise. Thanks!
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2024 02:09 AM
Hello @SonaK ,
Create onsubit client script and use below logic or use before insert/update BR and remove return values from the same logic:
(function executeRule(current, previous /*null when async*/) {
// Your condition to check before showing confirmation
if (current.some_field == 'some_value') {
// Show a confirmation message
if (!confirm('Are you sure you want to submit this task?')) {
// If the user clicks "Cancel", prevent form submission
return false;
}
}
return true;
})(current, previous);
Please accept my solution if it works for you and thumps up to mark it as helpful.
Thank you!!
Dnyaneshwaree Satpute
Tera Guru
Thank you!!
Dnyaneshwaree Satpute
Tera Guru