Submit forms in dialogs
If you’re using a
<form> element inside a
<dialog> element, you might want to consider setting its
method attribute to
This will cause the dialog to close automatically on form submission and set the value of the submit button to
dialog.returnValue. It will not actually submit the form though.