
FetchIt
Lightweight AJAX form submission in MODX via the Fetch API on top of FormIt or a custom snippet


Two common cases: the form lives in a modal and closes it after a success, or the form is on the page and a modal with the answer opens after it is sent. Both need the fetchit:success event.
<dialog> — the modal built into the browserA modal with a form needs one more rule: call form.reset() when the modal closes. FetchIt removes the errors and messages, and the next time the visitor sees a clean form.