For the following code examples to work, you will need to add Fliplet’s Data Sources API to your app. To add it follow the steps referenced here.

Confirmation toast on web

Image 1 of 2

A confirmation message is used when you need a simple input from the user. For example when you need to ask if a user wants to accept or cancel.

To add some context on how you can use this, let’s get a user with the name “Bill”:

var dataSourceConnection;
var dataSourceId = 12345; // Change this number to match your data source ID
var userBill;

  .then(function (connection) {
    dataSourceConnection = connection;

    return connection.findOne({
      where: { name: 'Bill' }
  .then(function (user) {
    userBill = user;

After you have Bill’s data you can then trigger the confirmation popup to update his name to “Bill Smith” by using the code below, that will ask if a user wants to accept the data or cancel. Based on their input we can either update Bill’s name or do something else.

  title: 'Are you sure you want to save the new data?',
  labels: [
      label: 'Continue'
  cancel: 'Cancel'
}).then(function (i) {
  // i will be 0 or undefined depending on users's choice
  if (typeof i === 'undefined') {
    // User cancelled

  // Add code here to continue
  dataSourceConnection.update(, {
    name: 'Bill Smith'