function Form_CustomValidate(&$customError)
{
Swal.fire({
title: "Do you want to save the changes?",
showDenyButton: true,
showCancelButton: true,
confirmButtonText: "Save",
denyButtonText: `Don't save`
}).then((result) => {
/* Read more about isConfirmed, isDenied below */
if (result.isConfirmed) {
Swal.fire("Saved!", "", "success");
} else if (result.isDenied) {
Swal.fire("Changes are not saved", "", "info");
}
});
}
You may refer to the generated js/ew.js file. Make sure you did not enable Compress project .js option under Tools → Advanced Settings before re-generating ALL the script files.
I was try to uncheck compress .js under Tools Advanced Setting and wrote this code after generating code nothing happen while click Add button no popups message appear, i really confused why?
function Row_Inserting($rsold, &$rsnew)
{
?>
<script>
Swal.fire("SweetAlert2 is working!");
</script>
<?php
return true;
}
You tried to use client side JavaScript in both Form_CustomValidate and Row_Inserting server events, it won’t work. You should use client side Form_CustomValidate event.