Display Confirmation Messages when Saving Records
This article introduces how to display confirmation messages with SweetAlert when saving records in Kintone.
What is SweetAlert?
SweetAlert is a library that displays
confirm() pop-ups with a modern style. Details and examples can be viewed on the SweetAlert website
When saving a record, a pop-up is displayed containing data set in the Drop-down field. Clicking “OK” navigates the user to the Record Details page where the data is saved.
Prepare the App
Create an App with the following field and settings. Save the form when finished.
|Field Type||Field Name||Field Code||Settings|
|User selection||Ordering User||ordering_user|
|Drop-down||Lunch Selection||lunch_selection||Set the following options:
Set the Library
The files settings should look like the following:
Test the Code
After saving the settings and clicking on Update App, navigate to the Record List page. Start adding a new record, place data into the fields and click the save button. A message modal created by SweetAlert should pop-up. The selected order should be included in the message.
Note that this library runs its process as an asynchronous operation. The code may keep running while the pop-up is displayed, before the user clicks on any buttons.