Completed Sample Images
When trying to save a record, a prompt will appear asking to confirm saving.
When trying to delete a record, a prompt will appear to confirm the deletion.
Setting up your App
Create a Kintone App with any type of fields inside.
In this example, a simple form is created with a single Text field as shown below:
For displaying a notification to confirm/cancel saving a record [save.js]:
For displaying a notification to confirm/cancel deleting a record [recover_delete.js]:
After saving the settings, update your App. Try creating or deleting a record. The SweetAlert2 pop-up should now ask for confirmation before proceeding the action.
SweetAlert vs. SweetAlert2
SweetAlert and SweetAlert2 are two separate software made by different creators. They generally provide the same features with some additional functionalities added within SweetAlert2. Some of these features include the ability to chain pop-up messages, the "question" pop-up icon, pop-up screen positioning, custom animations, messages with images, dynamic queues, RTL (right to left scripts) language support, and Ajax requests. In addition, there are various input types included within SweetAlert2 such as URLs, email addresses, radio buttons, files, and drop-down selection menus. SweetAlert has released a version 2.0 that provides users with easier usability. Feel free to try both to compare functionality.
SweetAlert 2.0 update: https://sweetalert.js.org/guides/#upgrading-from-1x
The SweetAlert2 website has many other example pop-up styles, as well as sample code to generate them.