I am working on a project that needs to show a modal dialog when the user clicks submit. I have the dialog working. When the user clicks Submit, the dialog is shown and the form is not submitted. When the user clicks OK on the dialog, I need the form to be submitted. This is the part I'm having trouble with. When the dialog is closed (click yes or no), the Submit button no longer works. Here is the code I'm using:
$(document).ready(function () { $('#form1').submit(function (evt) { if ($("#q4 input").is(":checked")) { alert('submit'); return true; } else { alert('test'); showJQueryDialog(); return false; } }); }); function showJQueryDialog() { $('<div id="#pmtDlg"></div>').dialog({ resizable: false, dialogClass: "no-close", closeOnEscape: false, modal: true, buttons: { "Yes": function () { $("#q4 input").attr('checked', true); $(this).dialog("close"); $('#form1').submit(); }, "No": function () { $(this).dialog("close"); } } }).html('Would you like to continue?'); }
Any pointers on how to get this to work will be greatly appreciated.
This is in Forms 9.1.1.1517
Thank you