new

FetchIt

A lightweight Extra for MODX Revolution for submitting forms with Fetch API
Free
Download the package from the manager of your site.
How to download?
The author
Баха
Packages
3
Downloads
1 448
Автор дополнения
Packages
3
Downloads
1 448
Version 3.1.4-pl
Release date 09.09.2026
Downloads 1 040
Views 2 573
An Extra for MODX Revolution for sending and processing forms using Fetch API.

CMS/CMF MODX Revolution has FormIt component, which implements sending and processing forms, but it works by standard browser method, i.e. with page reloading. But the modern web is demanding and the progressive step is to process them «on the fly». FetchIt, which uses FormIt, is exactly for these tasks, but you can also use your own snippet.

For such purposes there is AjaxForm component (although FetchIt is almost the same in its server part), but FetchIt has some advantages:

No dependencies

.
FetchIt has no dependencies, while AjaxForm has three: Big jquery library and its jquery-form and jGrowl plugins.

While there's no problem with the latter (you can override methods to show notifications), the first two are tricky.

Modern code

.
Minified script weighs 5 kilobytes and snippet registers it with attribute defer, thereby not preventing the page load.

Comfort

.
Incorporating your wraparound, adding popup messages and modal windows, these are tasks that you can solve very easily.

Documentation

The component has detailed documentation with dozens of examples for all cases.

[3.1.4] - 2026-09-09

Fixed

  • Form-level success and validation messages now update in the form on AJAX submit via [data-success] and [data-validation-error] (#15). Custom templates need these attributes instead of [[+fi.success:…]] conditionals for AJAX.
  • Whitespace-only FormIt field errors (e.g. fi.error.email) no longer mark the form as failed (#14). Placeholders are sanitized with strip_tags and html_entity_decode; blank validation_error_message falls back to the lexicon key.
  • PHP 8 warning for undefined $_SESSION['fetchit_called'] in registerScript() (#13).
  • PHP 8 warnings for undefined $_SESSION['FetchIt'] when saving or reading snippet properties.
  • Dead !isset($_POST) check in action.php replaced with empty($_POST) so GET requests redirect correctly.
  • Custom successMessage from the FetchIt snippet call is used in the AJAX success response.

Changed

  • Frontend build dependencies bumped to Rollup 4; CI and release workflows added for the next branch (MODX 3.2.4-pl build host).

[3.1.2] - 2023-11-11

  • Added error for Recaptcha V3.
  • Fixed when MODX installed not in the root.

[3.1.1] - 2023-07-14

  • Fixed support in php 8.

[3.1.0] - 2023-06-12

  • Default notifier library.

[3.0.0] - 2023-06-06

  • MODX 3 support.

[1.1.3] - 2026-08-12

  • Add error for recaptchaV3 by @achterbahn in #6
  • chore: шаблоны issue и PR by @Ibochkarev in #16
  • fix(formit): кастомный successMessage в AJAX-ответе by @Ibochkarev in #12
  • fix(session): защита от undefined fetchit_called на PHP 8 by @Ibochkarev in #13
  • fix(formit): игнорировать пустые ошибки полей by @Ibochkarev in #14
  • fix(ui): сообщения success/validation в форме при AJAX by @Ibochkarev in #15
  • fix(session): Prevent PDO serialization fatal (1.x) by @Ibochkarev in #19
  • ci: Автосборка transport-пакета и проверки на PR by @Ibochkarev in #21

[1.1.2] - 2023-11-11

  • Added error for Recaptcha V3.

[1.1.1] - 2023-07-14

  • Fixed support in php 8.

[1.1.0] - 2023-06-12

Added

  • Default notifier library.

[1.0.1] - 2023-03-21

Changed

  • Fixed undefined fetchit bug when snippet calls by fenom.

[1.0.0] - 2023-03-10

Changed

  • Fixed undefined variable $hash.

[1.0.0-beta] - 2023-02-20

Added

  • First init.