Skip to content
  1. Extras
  2. FetchIt

FetchIt

MODX Revolution component: submit HTML forms through the Fetch API without a page reload. By default it drives FormIt. You can plug in your own snippet instead.

Why

FormIt alone answers with a normal POST and a full reload. FetchIt keeps FormIt (or your code) on the server and adds a client layer: FormData, a JSON response, field errors, optional toasts, and events.

AjaxForm covers a similar job. The server side is close. On the front end FetchIt differs:

  • no required jQuery or jquery-form;
  • minified script about 5 KB, loaded with defer;
  • you wire notifications yourself or turn on built-in Notyf (fetchit.frontend.default.notifier).

Installation

Via Package Manager:

Or build a transport package from GitHub.

Next: Quick start.