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


Client-side checks catch mistakes before sending, so the visitor does not wait for the server to learn about a typo in the e-mail. All the examples follow one scheme: a fetchit:before handler checks the fields, shows the errors with setError and cancels the submission with preventDefault().
Important!
Client-side validation is not secure and should only be used to improve user experience.
required, type and pattern attributes, no librarieszod/mini build for the browserFetchIt removes the errors by itself before each submission and from a field the visitor starts editing, so the handler does not need to clear them.