Form Handling

By wrapping the modal content in a form, and adding the data-modal-submit attribute an element, the modal form can be submitted as an AJAX call. Files can also be posted if the browser supports the FormData API. Inspect the develop console and give it a try!