I have a specific unified alert package that displays alerts/notifications upon submission in a cohesive way across web browsers. I am finding that after submit in the Autoform.hook(), the default browser alert format also fires. Any help to prevent the default browser alter from firing would be appreciated.
I have tried using an event handler:event.preventDefault();
AutoForm.hooks({
'edit-form': {
onSuccess: function (operation, result, template) {
IonPopup.alert({
title: 'Saved Succesfully!',
subTitle: 'Please Click OK to go back',
onOk: function()
{
Session.set("editingReqEvent", null);
Router.go('calendar');
}
});
},
onError: function(operation, error, template) {
IonPopup.alert({title: 'Save Unsucessful!', subTitle: 'Please go back and check entries'});
console.log(error);
}
}
});
You can disable the default alert event, or overwrite it just with plain js:
window.alert = function() {};