Admiro Dashboard Theme For Appgini
  • Introduction
  • Installation Guide
  • General Settings
  • Table Menu Settings
  • Dashboard Builder
  • Custom Page Builder
  • Reports Builder
  • Translation Tool For Admiro
  • File Manager
  • Widget Functions
    • Data Card
  • Sweet Alert
  • Alert
  • Welcome Banner
  • Statistics Counter Card
  • Basic Table
  • Data Table
  • Modal
  • Full Calendar
  • Drop Zone
  • Line Chart
  • Area Chart
  • Bar Chart
  • Column Chart
  • Pie Chart
  • Donut Chart
  • Timeline Chart
  • Options
Powered by GitBook
On this page
  • Structure
  • Parameters
  • Example Usage
  • Output

Sweet Alert

PreviousData CardNextAlert

Last updated 7 months ago

The sweet alert function enables you to display alerts after actions have been done eg, after form submission you can display an error or success alert to the user

Structure

sweetAlert($title, $text, $type, $refresh = 'true', $redirect = '')

Parameters

The sweet alert function has 5 parameters as explained below

  • Title- This will be the title displayed on the alert

  • Text- This will be the body or description part of the alert

  • Type- This is the type of the alert values can either be: success, error, info, question, warning

  • Refresh - This is a string that accepts true or false. It is used to determine if the page will refresh after user clicks OK on the alert.

  • Redirect- This is an optional link that you can provide, if refresh is true, and you provide a link here, the user will be redirected to that link after they click OK on the sweet alert. If no redirect is provided and refresh is true, the current page will be refreshed.

Example Usage

echo sweetAlert('Booking Received','Your booking request has been successfully received','success','true');

Output

Sample sweet alert.