
FetchIt
MODX Revolution component for form submission using the Fetch API.
Introduction
MODX Revolution has FormIt for form submission and handling, but it uses the browser’s default method (page reload). Modern sites often need forms handled “on the fly”. FetchIt uses FormIt on the server but lets you use your own script as well.
Advantages
AjaxForm is similar (FetchIt’s server side is almost the same), but FetchIt has several advantages:
No dependencies
FetchIt has no dependencies. AjaxForm has three: the large jQuery library and plugins jquery-form and jGrowl.
The last one is easy to override (notification methods), but the other two are harder to replace.
Modern code
The minified script is about 5 KB and the snippet registers it with the defer attribute so it does not block page load.
Ease of use
Integrating your markup, adding popup messages and modals is straightforward.
Installation
The component is free and can be installed via the Package Manager from:
- modstore.pro
- Official modx.com repository
Or build the package from the component repo on GitHub
