Javascript – sweetalert and form submit
I have a form and I want to trigger an alert (using sweetalert) on submit: <form id="verbale" class="verbale" action="editor_conferma.php" method="post"> ... <input id="go" type="submit" name="go" value="go" class="swa-confirm"> </form> <script> $(document).on("submit", ".swa-confirm", function (e) { e.preventDefault(); var $myForm = $('.verbale'); if…